# Strict Mode: set -euo pipefail

set -euo pipefail makes a script stop at the first sign of trouble: -e stops at a command that fails, -u at a variable that was never set, and -o pipefail at a pipeline with a failing part, with a few surprises to know about: a grep that finds nothing, ((count++)) and a missing $1.

![Cheat sheet for the lesson Strict Mode: set -euo pipefail: set -euo pipefail makes a script stop at the first sign of trouble: -e stops at a command that fails, -u at a variable that was never set, and -o pipefail at a pipeline with a failing part, with a few surprises to know about: a grep that…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/5c90d1bd9984460d9b7fc54d83758ecb.webp)

- Category: Bash
- Level: Freelancer
- Tags: exit-code, linux, pipeline, shell-variable, strict-mode, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-strict-mode-cheat-sheet
