bash: “set -e” and “set -x”

set -e

-e Exit immediately if a command exits with a non-zero status.

set -x

-x Print commands and their arguments as they are executed.

From

bash-3.2$ help set

More: https://stackoverflow.com/questions/19622198/what-does-set-e-mean-in-a-bash-script

 

Note, there’s an argument (in the SO post) that better practice is:

 

Leave a Reply

Your email address will not be published. Required fields are marked *