Run a Command if Another Command Succeeds
Tagged with: bash, cli, command, conditional, if, Linux, Ruby, shell
Friday, December 14th, 2007 10:43 PM
This will let you run a linux command based on the success of anther command. Note: This will only work in bash shell.
ruby Create_PDF.rb && if [ $? == 0 ]; then kpdf report.pdf; fi