Re:Perl first commit: a “replacement” for Awk and sed
by orra on Sunday July 09, 2023 @02:11PM
(#36657171)
I haven't seen -E (aka -o errtrace) before, but it looks like a useful addition to the standard-ish -euxo pipefail.
Moreover, it's existence being required explains why my error handling, recently, wasn't working as expected.
As for managing libraries, that's true, but you can certainly import and reuse some common util functions.
For example, this is at the top of most of my scripts:
This loads `lib.sh` from a common directory where my shell scripts live, which has some logging and error handling functions, so it cuts down on repetition just like a programming language would.