Tools to check shell scripts for problems

The ShellCheck tool is a linter for shell script, designed to find bugs and trouble spots in various flavors of shell scripts, including Bash. It identifies many of the common errors discussed in this book, and many more besides. It is available as both an online service and a command-line tool at https://www.shellcheck.net/.

The output of ShellCheck points you directly to trouble spots in your code, including error codes for reference with its online documentation:

Get Bash Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.