tee.2: Add shell session demonstrating use of the example program

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-10-28 10:08:42 +01:00
parent ced56703cb
commit f7d11fdac6
1 changed files with 12 additions and 1 deletions

View File

@ -134,11 +134,22 @@ under the covers,
assigns data in the output by merely grabbing
a reference to the input.
.SH EXAMPLE
The following example implements a basic
The example below implements a basic
.BR tee (1)
program using the
.BR tee ()
system call.
Here is an example of its use:
.in +4n
.nf
$ \fBdate |./a.out out.log | cat\fP
Tue Oct 28 10:06:00 CET 2014
$ \fBcat out.log\fP
Tue Oct 28 10:06:00 CET 2014
.fi
.in
.SS Program source
.nf
#define _GNU_SOURCE