Last active
December 7, 2020 15:01
-
-
Save T1T4N/780e880115ac0702549d72f2ac78020e to your computer and use it in GitHub Desktop.
Bash redirect output to syslog
This file contains hidden or 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
# As the first command in a script | |
exec 1> >(logger -is -t "$(basename "$0")") 2>&1 | |
# Alternatively, output everything to a file | |
#exec 1> "$PWD/out.log" 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment