Fail fast, fail loud
-e— exit on first error-u— error on unset variables-o pipefail— pipeline fails if any stage fails
Best practice: Start every production script with strict mode. Handle expected failures with if ! cmd; then or cmd || true.
This demo may exit early under -u — that is the point. Remove -u or set REQUIRED to experiment.
Output
Press Run to execute your code.