Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tee(1) — OSF/1 X2.0-8 MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

echo(1)

script(1)

tee(1)  —  Commands

OSF

NAME

tee − Displays the output of a program and copies it into a file

SYNOPSIS

tee [−ai] file ... 

The tee command reads standard input and writes both to standard output, and to each specified file. 

FLAGS

-aAdds the output to the end of file instead of writing over it. 

-iIgnores the SIGINT signal. 

If you specify both flags, each must appear separately on the command line, preceded by - (dash). 

DESCRIPTION

tee is useful when you wish to view program output as it is displayed, and also want to save it in a file. 

EXAMPLES

     1.To view and save the output from a command at the same time, enter:

lint  program.c | tee  program.lint

This displays the standard output of the command lint program.c at the terminal, and at the same time saves a copy of it in the file program.lint.  If program.lint already exists, it is deleted and replaced. 

     2.To display and append to a file, enter:

lint  program.c | tee  -a  program.lint

This displays the standard output of lint program.c at the terminal and at the same time appends a copy of it to the end of program.lint.  If the file program.lint does not exist, it is created. 

RELATED INFORMATION

Commands:  echo(1), script(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026