Thursday, January 30, 2014

Pure command line if then without the if or then

The && and || can be used to control command flow like if then...
$ /use/bin/somecmd && echo "it worked!" || echo "epic fail!"

No comments: