Ravi Sir's Cards › AWS
Strict mode
This revision card explains Strict mode. It starts from the need that -e stops on errors. It describes -u fails on unset vars. The how-to section notes pipefail catches pipe errors. An example on the card is top of the script.
Read card text
What this card says
Why do we need it?
-e stops on errors.
What is it?
-u fails on unset vars.
How to do it
pipefail catches pipe errors.
Example
Top of the script.
set -euo pipefail