Exercise 6:
set -e
f() { false; echo survived; }
if ! f; then :; fi
That one was fun to learn.
Even with all the jank and unreliability, I think set -e
does still have some value as a last resort for preventing unfortunate accidents. As long as you don’t use it for implicit control flow, it usually (exercise 6 notwithstanding) does what it needs to do and fails early when some command unexpectedly returns an error.
I don’t think people are upset at you calling out Nintendo for their rampant lawsuits, but instead at your dismissive reply when someone provided a list of games to answer your question.