Hacker News new | ask | show | jobs
by ktpsns 1932 days ago
That's the same approach I am using in all my scripts. You can even combine that with `set -e` and run some

    commandThatMayFail || true
in order to continue the script if some optional step fails.

Bonus note: The notation "do something else die 'with message'" stems from Perl, AFAIK. See for instance https://perldoc.perl.org/Carp