<?xml version="1.0" encoding="utf-8"?>

<!--

Copyright 2006 Joey Hess <id@joeyh.name>

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

-->

<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
[]>

<refentry>
	<refentryinfo>
		<address>
			<email>id@joeyh.name</email>
		</address>
		<author>
			<firstname>Joey</firstname>
			<surname>Hess</surname>
		</author>
		<date>2016-12-20</date>
	</refentryinfo>

	<refmeta>
		<refentrytitle>pee</refentrytitle>
		<manvolnum>1</manvolnum>
		<refmiscinfo class="manual">moreutils</refmiscinfo>
		<refmiscinfo class="source">moreutils</refmiscinfo>
	</refmeta>

	<refnamediv>
		<refname>pee</refname> 
		<refpurpose>tee standard input to pipes</refpurpose>
	</refnamediv>

	<refsynopsisdiv>
		<cmdsynopsis>
			<command>pee</command>
			<arg>--[no-]ignore-sigpipe</arg>
			<arg>--[no-]ignore-write-errors</arg>
			<group choice="opt">
				<arg rep="repeat"><replaceable>"command"</replaceable></arg>
			</group>
		</cmdsynopsis>
	</refsynopsisdiv>
	
	<refsect1>
		<title>DESCRIPTION</title>
		
		<para><command>pee</command> is like <command>tee</command>
		but for pipes. Each command is run and fed a copy of the
		standard input. The output of all commands is sent to
		stdout.</para>

		<para>Note that while this is similar to
		<command>tee</command>, a copy of the input is not sent
		to stdout, like tee does. If that is desired, use 
		<command>pee cat ...</command></para>
	</refsect1>

	<refsect1>
		<title>OPTIONS</title>

		<variablelist>
		    <varlistentry>
			<term><option>--ignore-sigpipe</option></term>
			<term><option>--no-ignore-sigpipe</option></term>
			<listitem>
			    <para>Do (not) ignore SIGPIPE.  Any command started
			    by <command>pee</command> might cause a SIGPIPE
			    when it exists.  If you ignore SIGPIPE, you
			    probably also want to ignore write errors (see
			    below).  Ignoring SIGPIPE is the default
			    behaviour.</para>
			</listitem>
		    </varlistentry>

		    <varlistentry>
			<term><option>--ignore-write-errors</option></term>
			<term><option>--no-ignore-write-errors</option></term>
			<listitem>
			    <para>Do (not) ignore write errors.  When a command
			    started by <command>pee</command> is no more
			    accepting data via the pipe between itself and
			    <command>pee</command>, a write error occurs in
			    <command>pee</command>.  If this error is not
			    ignored, <command>pee</command> is going to
			    terminate all child processes and exists.  Ignoring
			    write errors is the default behaviour.</para>
			</listitem>
		    </varlistentry>

		</variablelist>
	</refsect1>
	
	<refsect1>
		<title>SEE ALSO</title>
		
		<para>
			<citerefentry>
				<refentrytitle>tee</refentrytitle><manvolnum>1</manvolnum>
			</citerefentry>,
			<citerefentry>
				<refentrytitle>pipe</refentrytitle><manvolnum>7</manvolnum>
			</citerefentry>
		</para>
		
	</refsect1>
	
	<refsect1>
		<title>AUTHOR</title>
		<para>
			Miek Gieben
		</para>
	</refsect1>
</refentry>
