|Purpose:||Copy standard input to both standard output and a file|
|Format:||TEE [/A /Dn /F"format" /R /T] file...|
|file||One or more files that will receive the "tee-d" output.|
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 to standard output, the other to the file(s) 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.
If you are typing at the keyboard to produce the input for TEE, you must enter a Ctrl-Z to terminate the input.
See Piping for more information on pipes.
Search the file DOC for any lines containing the string Take Command, make a copy of the matching lines in TC.DAT, sort the lines, and write them to the output file TCS.DAT:
ffind /t"Take Command" doc | tee tc.dat | sort > tcs.dat
|/F"..."||The format string. See @DATEFMT for details on format arguments.|