Some notes on shell scripts commands

less than 1 minute read

set -e

This command makes a shell script terminate as soon as it hits an error.

set -o pipefail

With this command set at the beginning, a shell script has exit code 0 if and only if all commands exit successfully.

set -x

This command makes the script prints each command before execution.