Bash error handling

From wikinotes

exitcodes and returncodes

fail on error

By default, bash continues running when errors occur. You can change this behaviour by adding the following line to your bash script (at the top).

set -e

debugging bash scripts