Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created March 24, 2019 06:18
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 miguelmota/48a62676d56ce033eb1b131be31fa16e to your computer and use it in GitHub Desktop.
Save miguelmota/48a62676d56ce033eb1b131be31fa16e to your computer and use it in GitHub Desktop.
Bash exec append stdout and stderr to log file
# append both stdout and stderr to script log in right order
exec >> >(tee -a script.log) 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment