Name

tee

Synopsis

    tee [options] [files]

Duplicate the standard input ; send one copy to standard output and another copy to files.

Options

-a, --append

Append output to files.

-i, --ignore-interrupts

Ignore all interrupts.

Examples

Display a who listing on the screen and store it in two files:

    who | tee userlist ttylist

Display misspelled words and add them to existing typos :

    spell ch02 | tee -a typos

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.