TEE - "Tee" pipe fitting
Purpose: Copy standard input to both standard output and a file.
Format: TEE [/A] file ...
file : One or more files that will receive the "tee-d"
output.
/A(ppend)
See also: Y and the redirection options.
Usage
TEE is normally used to "split" the output of a program so that you can
see it on the display and also save it in a file. It can also be used to
capture intermediate output before the data is altered by another program
or command.
TEE gets its input from standard input (usually the piped output of
another command or program), and sends out two copies: one goes to
standard output, the other to the file or files that you specify. TEE is
not likely to be useful with programs which do not use standard output,
because these programs cannot send output through a pipe.
For example, to search the file DOC for any lines containing the string
"CMD.EXE", make a copy of the matching lines in 4.DAT, sort the lines,
and write them to the output file 4O.DAT :
[c:\] find "CMD.EXE" doc | tee 4.dat | sort > 4o.dat
If you are typing at the keyboard to produce the input for TEE, you must
enter a Ctrl-Z to terminate the input.
When using TEE with a pipe under CMD.EXE, the programs on the two ends of
the pipe run simultaneously, not sequentially as in 4DOS.
See Piping for more information on pipes.
Options
/A: (Append) Append the output to the file(s) rather than
overwriting them.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs