tee

clone output stream

Command


SYNOPSIS

tee [-ai] [file ...]


DESCRIPTION

The tee command clones an output stream. It copies the standard input to each output file as well as to the standard output.

Options

-a

appends to (rather than overwrites) each output file.

-i

ignores interrupt signals, making it suitable for use as a background process.


EXAMPLES

prog | tee file
This runs the program prog and pipes the program's standard output into tee. As a result, tee writes the output to both the standard output and the specified file.


DIAGNOSTICS

Possible exit status values are:
0

Successful completion.

1

Failure due to any of the following:

— out of memory
— I/O error reading or writing to a file
— error creating an output file
— error opening an output file for append
2

Failure due to invalid command line option.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0.


SEE ALSO

Commands:
cat


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]