Really great advice.
One other thing I'd promote is Google's Shell Style Guide: google.github.io/styleguide/shell.xml. It's the nearest thing I've found to a universally-agreed style guide for Bash scripting.
Of course, it's actually only mandated for code written internally at Google, but it seems to me to be worthy of wider adoption.
We’re a place for programmers to stay up-to-date, learn new skills, and share ideas.
We’ll never post without your permission.