Re:Shell Script Best Practices, from a decade of scripting t...
by jlg23 on Thursday October 27, 2022 @10:40AM
(#33358203)
>> "Use set -o errexit"
> Only if it doesn't matter that the script fails non-gracefully. Some scripts are better to either have explicit error handling code, or simply never fail.
Then handle those errors explicitly. The above will catch those error that you did not think about.
> Only if it doesn't matter that the script fails non-gracefully. Some scripts are better to either have explicit error handling code, or simply never fail.
Then handle those errors explicitly. The above will catch those error that you did not think about.