read the transcript!
shellcheck finds problems with your shell scripts
$ shellcheck my-script.sh
shellcheck: oops, you can’t use in an
if [ ... ]!
it checks for hundreds of common shell scripting errors
shellcheck: hey, that’s a bash- only feature but your script starts with
every shellcheck error has a number (like “SC2013”)
and the shellcheck wiki has a page for every error with examples! I’ve learned a lot from the wiki.
it even tells you about misused commands
shellcheck: hey, it looks like you’re not using
grep correctly here
person: wow I’m not! thanks!
your text editor probably has a shellcheck plugin
shellcheck: I can check your shell scripts every time you save!
basically, you should probably use it
bash has too many weird edge cases for me to remember, I love that shellcheck can help me out!