![A stick figure smiling](/images/welcome.jpg)
Here's a preview from my zine, Bite Size Bash!! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!
![Image of a comic. To read the full HTML alt text, click "read the transcript".](/images/uploads/shellcheck.png)
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 #!/bin/sh
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!
Saturday Morning Comics!
Want another comic like this in your email every Saturday? Sign up here!