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 where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.