Created
December 8, 2015 09:38
-
-
Save darkxanter/d3c1a519ac6593746306 to your computer and use it in GitHub Desktop.
redirect both standard output and standard error of all commands in a bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
logfile=$$.log | |
exec > $logfile 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment