_sho_ 1174320290 learn faq75 greycat 1292001116 forget greycat 1292001148 learn To log all of the script's subsequent stdout and stderr in a file: exec >mylogfile 2>&1 greycat 1309464577 forget greycat 1309464640 learn To log all subsequent output (+ stderr): exec >>somefile 2>&1 ## To log all your actions, plus stdout+stderr, add set -x after that. ## To log *and also pass through* see http://mywiki.wooledge.org/BashFAQ/106