News for hackers. Stuff that matters.
Re:Shell Script Best Practices, from a decade of scripting t... by tuvi13 on Thursday October 27, 2022 @09:11AM (#33356961)
I get my "best practices" from here: https://tldp.org/LDP/abs/html/index.html

I think this site is amazing.

Re:Shell Script Best Practices, from a decade of scripting t... by ndsipa_pomu on Thursday October 27, 2022 @01:57PM (#33361393)
I used to refer to that all the time, but it doesn't have newer bashisms (shell != bash).

A better resource is https://mywiki.wooledge.org/BashGuide Also, a preliminary read of https://mywiki.wooledge.org/BashPitfalls is advised.

Using shellcheck as a bash/shell linter is the ultimate. When you get a new warning, you can look up the code and learn why it's complaining.