5 ms·
I start bash scripts, by setting the holy trinity: set -eou That prevents end-of-the-world scenario like the one above, if the script derails.
by olafure 7y ago
I start bash scripts, by setting the holy trinity:
set -eou
That prevents end-of-the-world scenario like the one above, if the script derails.
- saagarjha 7y agoMaybe also add "pipefail" to the end of that?
- scarejunba 7y agoHaha right, I feel like these should always be popularized as `set -eu` and `set -o pipefail` rather than making it look like you an `set pipefail`. I wonder if that chap has been uselessly printing options at the beginning of scripts for a while now.
- loeg 7y agoalias rm='rm --no-preserve-root'