tl;dr:"This article is about a few quick thumb rules I use when writing shell scripts that I’ve come to appreciate over the years. Very opinionated." 15 rules in total, including: (1) Use bash. Using zsh or fish or any other, will make it hard for others to understand / collaborate. Among all shells, bash strikes a good balance between portability and DX. (2) Just make the first line be #!/usr/bin/env bash, even if you don’t give executable permission to the script file.