mirror of https://github.com/mkerrisk/man-pages
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:
parent
ced56703cb
commit
f7d11fdac6
13
man2/tee.2
13
man2/tee.2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue