As mentioned before, tee
, a useful but horridly named utility, allows you to save stdout
while echoing it to the screen. Sometimes, however, you need both stderr
and stdout
. Bash allows you to combine stderr
and stdout
by appending 2>&1
to your command. Thus
1
|
|
saves both stderr
and stdout
, correctly temporally interleaved, to the specified log file.