Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/t/tee.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/t/tee.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/t/tee.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/t/tee.html on line 8
Duplicate standard input (POSIX)
tee [-ai] [file... ]
QNX Neutrino, Microsoft Windows
- -a
- Append output to the specified file rather than overwriting it.
- -i
- Ignore the SIGINT signal.
- file
- A pathname of an output file. If you don't specify any files, tee
writes to the standard output.
The tee utility copies standard input to standard output,
making a copy in zero or more files. It doesn't buffer its output.
You usually use tee in a pipeline, in order to make a
copy of the output of a utility.
If -a is specified, the named file is opened for appending
and data from tee is added to the file's existing data. If
-a isn't specified, the file is opened for writing and the
original data in the file is lost.
While it normally takes the default action for all signals,
tee ignores SIGINT if -i is specified.
Look for some spots in a collection of C programs where a variable count
looks like it's being assigned a value, and tee the output both
to standard output (where you can see it immediately) and a file
output where you can look at it later (note the
grep example here isn't sufficient for an exhaustive
examination of where count might be assigned a value):
grep 'count *[^+-/\*]\{,1\}= *[!-([:alnum:]]' | tee output
An output file is created for each file operand.
- 0
- Success.
- > 0
- An error occurred.
If a write to any successfully opened file fails, writes to standard
output and other successfully opened files continue. The exit status,
however, is nonzero.
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/t/tee.html on line 141
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/t/tee.html on line 141