view docs/nitros9guide/tee.refentry @ 2322:61fb37b19edd

Edition #3 - for vtio instead of cc3io Willard Goosey
author aaronwolfe
date Mon, 11 Jan 2010 04:20:41 +0000
parents 4dae346c4969
children
line wrap: on
line source

<refentry id="tee">
<refnamediv>
<refname>TEE</refname>
<refpurpose>Copy standard input to multiple output paths</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>tee</command>
<arg choice="plain">
  &repeatst;<replaceable>path</replaceable>&repeaten;
</arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1><title>Description</title>

<para>
This command is a filter (see <xref linkend="sec4.3.3"/>) that copies all text lines from
its standard input path to the standard output path
<emphasis>and</emphasis> any number
of additional output paths whose pathlists are given as parameters.
</para>
<para>
The example below uses a pipeline and <command>tee</command> to simultaneously send the
output listing of the <command>dir</command> command to the terminal, printer, and a
disk file:
</para>
<screen>
dir e ! tee /printer /d0/dir.listing
</screen>
<para>
The following example sends the output of an assembler listing to a
disk file and the printer:
</para>
<screen>
asm pgm.src l ! tee pgm.list &gt;/printer
</screen>
<para>
The example below &quot;broadcasts&quot; a message to four terminals:
</para>
<screen>
echo WARNING System down in 10 minutes ! tee /t1 /t2 /t3 /t4
</screen>
</refsect1>
</refentry>