I believe the intention is for the script in question to fail fast.
To test this yourself, simply type set -e
at a Bash prompt. Now, try running ls
. You'll get a directory listing. Now, type lsd
. That command is not recognized and will return an error code, and so your Bash prompt will close (due to set -e
).
Now, to understand this in the context of a 'script', use this simple script:
#!/bin/bash# set -elsdls
If you run it as is, you'll get the directory listing from the ls
on the last line. If you uncomment the set -e
and run again, you won't see the directory listing as bash stops processing once it encounters the error from lsd
.