Skip to content

Instantly share code, notes, and snippets.

@sandorkazi
Created August 5, 2020 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandorkazi/cdded14fb3f3f8378535bf9e842d10b8 to your computer and use it in GitHub Desktop.
Save sandorkazi/cdded14fb3f3f8378535bf9e842d10b8 to your computer and use it in GitHub Desktop.
#!/bin/bash
exec 3>&1 4>&2
trap 'exec 2>&4 1>&3' 0 1 2 3
exec 1>log.out 2>&1
# Everything below will go to the file 'log.out':
set -o xtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment