Bash Examples: Set Builtin

Last updated:
Table of Contents

WIP Alert This is a work in progress. Current information is correct but more content may be added in the future.

Force script to fail if any command fails

This prevents next commands from running in a bad state

#!/usr/bin/env bash

set -e 
set -o pipefail


# this will not run if command1 fails

# other commands (will not run if previous commands fail)

Dialogue & Discussion