Read from standard input and write to standard output and files
References
man tee
Synopsis
tee [OPTION]... [FILE]...
If a FILE is -
, copy again to standard output
-a, --append
Append to the given FILEs, do not overwrite-i, --ignore-interrupts
Ignore interrupt signals
Save your input into files at the same time
tee file1 file2
Append to file
cat file1 | tee -a file2
tee -a
: Write to both standard output and files>
,>>
: Only write to files!
cat file1 | tee -a file2
cat file1 | tee file2
# or ?
cat file1 > file2
cat file1 >> file2