Bash Script Set -E

Today I learned a few tips from my colleague in Bash.

We have a whole series of shell commands that need to run sequentially.

set -e will make sure the shell script will stop once one line failed.

Without set -e, the whole script will try to finish even if an intermediate step fail.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s