tee 可将从标准输入读到的东西同时输出到标准输出和文件中去,某些场景下非常有用,本文留着备忘。
man tee:
TEE(1) User Commands TEE(1)
NAME
tee - read from standard input and write to standard output and files
SYNOPSIS
tee [OPTION]... [FILE]...
DESCRIPTION
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
--help display this help and exit
--version
output version information and exit
If a FILE is -, copy again to standard output.