some-command # check the return status to see if we can continue if [ $RETURNED -ne 0 ] then echo "something failed failed" exit 1 fi # otherwise continue executing