WIP Alert This is a work in progress. Current information is correct but more content may be added in the future.
Echo commands to stdout
Print every command you run to the terminal (standard output) using
# other commands below
Abort if any command fails
This prevents next commands from running in a bad state
set -e and
set -o pipefail to make the full script abort and exit if any single command fails.
set -o pipefail
# command2 will not be executed if command 1 fails
Set multiple options
set -ex to set both options,
x at the same time:
# both x and e options have been set