How To Succeed in Bash Programming

I almost committed a sin and gave someone unsolicited advice on Twitter! 🙂

For those of you working with Bash (or Sh) shell scripting, consider these two ideas:

1) abandon Bash, it’s very difficult to test and develop.

2) otherwise: always use Strict Mode, it catches a huge ton of flaky bugs: http://redsymbol.net/articles/unofficial-bash-strict-mode/

3) extra freebie: use Entr to do a very fast develop/test loop. This means you can save your script, have Shellcheck show you probable bugs, then run your script and get very rapid feedback. I should produce a screencast on this, in the meantime national treasure Julia Evans has a zine on the topic 🙂 https://jvns.ca/blog/2020/06/28/entr/