One of the first things I do is turn on errexit and pipefail options, but trapping ERR and combining with LINENO to catch silent exits is brilliant!
One of the first things I do is turn on errexit and pipefail options, but trapping ERR and combining with LINENO to catch silent exits is brilliant!
You will like the final version of the traperr ERR function. It looks to create a "stack trace" type dump of where you are in the script when it fails.
See it here: https://github.com/pottmi/stringent.sh