Ravi Sir's Cards › AWS
Safe script header
This revision card explains Safe script header. It starts from the need that stop on errors. It describes fail on unset variables. The how-to section notes fail inside pipes too. An example on the card is top of every script.
Read card text
What this card says
Why do we need it?
Stop on errors.
What is it?
Fail on unset variables.
How to do it
Fail inside pipes too.
Example
Top of every script.
set -euo pipefail