tee [-ai] [file …]
Copies standard input to standard output (unbuffered) as well as to file ….
Although file is optional it seems that without it only one output stream is produced.
With multiple files the same output is written to each.
-a |
Takes the default action for signals for example sigQUIT usualy ^\,
except with -i
greetings.txt:
$ echo "Hello" | tee greetings.txt Hello $ ls -log greetings.txt -rw-r----- 1 6 Apr 1 16:33 greetings.txt echo "report length is:" # use wc on stdout to count lines in ADDITION to writing the report to report.txt report | tee report.txt |wc -l echo "view it?" read A if [ $A != 'y' ] ; then exit ;fi clear cat report.txt echo "\n\n\n\n\n\n" 8739 view it? n