Skip to content

Instantly share code, notes, and snippets.

@pihentagy
Created June 26, 2014 19:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pihentagy/504d99e334ce21c342c0 to your computer and use it in GitHub Desktop.
Save pihentagy/504d99e334ce21c342c0 to your computer and use it in GitHub Desktop.
Bash command trace to file
# bash -x to file
exec 99>/tmp/mylogfile
BASH_XTRACEFD=99 # magic bash environment variable
set -o xtrace # start tracing from here onward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment