Is there any difference between using:
set -e
set -o errexit
From the bash man page it states they are the same and the only difference I can see is that from the user perspective the second format is more explicit.
Is there any difference between using:
set -e
set -o errexit
From the bash man page it states they are the same and the only difference I can see is that from the user perspective the second format is more explicit.
You're correct. set -o <option>
is the generic way to set various options, and set -e
is the shortcut for the errexit
option. They have the same effect.
There are a number of shortcuts like this, as the man page indicates. set -u
for set -o nounset
is another commonly used option.