Linux tee
tee : 显示程序的输出并将程序输出复制到一个文件中。
Usage: tee [OPTION]... [FILE]...
Copy standard input to each FILE, and also to standard output.
-a, --append append to the given FILEs, do not overwrite
-i, --ignore-interrupts ignore interrupt signals
-p diagnose errors writing to non pipes
--output-error[=MODE] set behavior on write error. See MODE below
--help display this help and exit
--version output version information and exit
example:
env | tee -a 1.txt
echo "----start install ..." 2>&1 | tee -a 1.txt