█████ ██ ██ ██ █████ ██████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███████ ██ ██ ██ ███████ ██████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ███████ ████ ██ ██ ██ ██ ██████
ShellCheck gives you automatic warnings/suggestions in bash/sh shell scripts.
$ brew install shellcheck
Bonus: If using Emacs's flycheck, you get ShellCheck support out of the box.