Skip to content

Instantly share code, notes, and snippets.

@changemewtf
Last active August 29, 2015 14:03
Show Gist options
  • Save changemewtf/f9a0d8340fc29da58427 to your computer and use it in GitHub Desktop.
Save changemewtf/f9a0d8340fc29da58427 to your computer and use it in GitHub Desktop.
source this script to log all of your shell output to a file... it'll make vim mad because output is not to terminal though
# Redirect stdout ( > ) into a named pipe ( >() ) running "tee"
exec > >(tee logfile.txt)
# Without this, only stdout would be captured - i.e. your
# log file would not contain any error messages.
exec 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment