4 ms·
If you need to replace every single <command> with "if ! <command>; then <failure commands>; fi": - How readable will your script be? - How likely are you to
by andreyv 9y ago
If you need to replace every single <command> with "if ! <command>; then <failure commands>; fi":
- How readable will your script be?
- How likely are you to miss a few checks?
- Will you be careful enough to also check commands like "echo" and "rm"?
"set -e" makes error handling implicit instead of explicit, and it solves these problems.