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.

sete

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s