Corner cases and shell scripts
rachelbythebay.com
rachelbythebay.com
Oddly, where things like config scripts are concerned, I've been more annoyed by software that tries to verify the contents of the script (except where visudo is concerned of course). It can get in the way, forcing me to deal with sorting out some particular bit of syntax immediately or else abandon all changes when really I just need to put that file aside for a moment and deal with the other service that just burst into flames. I wish I could recall the specifics, but I just dealt with this exact situation recently, and I would've liked to have had a "tazer" button on my keyboard for the developer responsible for that feature.
Aside: as a fellow troubleshooter, I have a huge amount of respect for rachel's content and skills. Her stuff is often a treat.
I thought rachelbythebay has worked at Google, whose internal Bash style guide recommends these settings:
set -o nounset # (aka set -u) abort on undefined variable reference
set -o errexit # (aka set -e) abort on any command failure
It may have also recommended enabling xtrace with line numbers, but I don’t remember.I'm talking about scripts that do things like unzipping (Python) PAR files, patching things they find inside, then running them to accomplish their own goals. The number of dependencies that introduced was just amazing.
You really don't want to know how the sausage is made.
[1] There are a lot of beautiful strangenesses in bash, especially the Parameter Expansion section of the manpage.