Created
July 16, 2018 05:13
-
-
Save minhd/eb923b547cc62b3abf8411c978322789 to your computer and use it in GitHub Desktop.
Bash script quits if previous return code is not valid #bash
This file contains 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
# run something | |
# rc is not 0, quit | |
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi | |
# continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment