2 ms·
How to catch and handle errors in bash (2021)
- openthc 4y agoclever implementation of a try/catch like thing in bash. If my scripts get that complicated I usually up-scale the code to $LANG_IN_FASHION_AT_WORK
- dolmen 4y agoThe implementation of try/catch is far from perfect. Just a first review pass: * `export` is used instead of `local` * `exit` instead of `return`