Sign in
Log inSign up

Which shell command(s) would you describe as amazing?

Ivan Hristov's photo
Ivan Hristov
·Oct 28, 2016

One of my favorite is the following bash command:

exec 1> >(logger -s -t $(basename $0)) 2>&1

which added at the top of your bash causes all stdout and stderr to be direct to syslog while instructing the logger to include the name of the script (via $(basename $0)) making debugging easier. What's your favorite?

One of the first spots of this command is to be found at https://twitter.com/lindvall/status/509054237267853312 by https://twitter.com/lindvall