Stochastic Nonsense

Put something smart here.

Saving Both Stdout and Stderr While Echoing to Screen

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
$ hadoop --jar $J/job.jar --job asdf 2>&1 | tee -a log.asdf.00

saves both stderr and stdout, correctly temporally interleaved, to the specified log file.