NAME
tee
—
copy to multiple outputs
SYNOPSIS
tee |
[-aei ] [file]… |
DESCRIPTION
Copies the standard input stream to the standard output stream and all files.
If writing to the standard output stream fails, a diagnostic is
issued and the copy is aborted. If opening or writing to a
file fails, however, a diagnostic is issued and the
file henceforth ignored (unless
-e
, in which case the copy is
aborted).
OPTIONS
-a
,--append
- Append to files instead of truncating.
-i
,--ignore-interrupt
- Ignore
SIGINT
. -e
- Abort the copy on I/O errors to files, instead of ignoring the offender.
-p
- Ignored for compatibility with the GNU system.
SIGNALS
SIGINT
- Ignored if
-i
; default otherwise.
EXIT STATUS
1 on a read, write, or open error.
SEE ALSO
STANDARDS
Conforms to IEEE Std 1003.1-2008
(“POSIX.1”); -e
is an
extension.
HISTORY
Appeared in Version 5 AT&T UNIX as tee(I):
tee - pipe fitting
With no flags and very lenient write error handling.
Version 7 AT&T UNIX sees
tee [ -i ] [ -a ] [ file ]
...
With -a
first seeking to the end of the file, instead of
strictly appending. -
functions as an alias for
-i
.
AT&T System III UNIX changes
-a
to actually append.