FREE TOOL

ShellCheck Error Decoder & Fixer

See SC2086 in your editor and don't know what it means? Type the code, get the fix. No wiki deep-dives required.

30 error codes decoded • Updated May 2026

/

Accepts SC codes, numbers, or pasted ShellCheck messages

error warning info style

← Type an SC code or click one from the list_

💡 Pro tip: Run shellcheck --severity=warning myscript.sh to skip style/info checks and focus on real bugs first. Add # shellcheck disable=SC2086 above a line to suppress that specific check only.
Recommended Hosting
Run ShellCheck in CI on a $4/mo DigitalOcean Droplet
Spin up a Linux VPS and add shellcheck to your deployment pipeline. Catch script bugs before they hit production.
Get $200 Free Credit →
Deploying scripts to production? Get a domain. Namecheap domains from $1.98/yr. Free WhoisGuard privacy included. Point it at your GitHub Pages or VPS in minutes.
View Hosting Plans →

Understanding ShellCheck Error Codes

Every ShellCheck finding follows the same format: SC plus a four-digit number. The prefix tells you what category you are in — SC1xxx for parser errors and sourcing issues, SC2xxx for runtime warnings and semantic problems, and SC3xxx for shell-specific quirks. Severity runs from error (will break at runtime) through warning and info down to style (correct but could be cleaner). An error on line 42 means fix it before shipping; a style note means your script works but reads like it was written in 2004.

The single most common code is SC2086 — unquoted variables. It accounts for more ShellCheck output than the next four codes combined. Most SC2xxx warnings trace back to one pattern: bash does something unexpected with unquoted strings — word-splitting filenames, expanding globs, or turning empty paths into /. That is how a blank DIR variable becomes rm -rf / and deletes your server. Quote your variables, quote your command substitutions ($()), and half your ShellCheck output disappears overnight.

Common ShellCheck Codes at a Glance

Click any code to jump to the decoder and see the full fix.

Code Severity Meaning

Frequently Asked Questions

What does ShellCheck SC2086 mean?

SC2086 means "Double quote to prevent globbing and word splitting." When you use an unquoted variable like $file, bash splits it on spaces and expands globs. Fix it by wrapping in double quotes: "$file".

How do I fix ShellCheck SC2046?

SC2046 fires when a command substitution is unquoted. Wrap it in double quotes: instead of rm $(find . -name '*.tmp'), use a while read loop with find -print0 to safely handle filenames with spaces.

How do I disable a ShellCheck warning?

Add a comment directive above the flagged line: # shellcheck disable=SC2086. This suppresses that specific check for the next command only. You can also pass --exclude=SC2086 on the command line to skip it globally.

What is the difference between ShellCheck error, warning, info, and style?

Error means the code will definitely fail or produce wrong results. Warning means it will likely cause problems in certain cases. Info highlights potential issues worth reviewing. Style suggests cleaner alternatives that don't affect correctness.

How do I install ShellCheck on Linux?

On Ubuntu/Debian: sudo apt install shellcheck. On Fedora: sudo dnf install shellcheck. On macOS: brew install shellcheck. You can also use it online at shellcheck.net or integrate it into VS Code, Vim, and most CI systems.

What are the most common ShellCheck warnings?

The top 5 most frequent ShellCheck codes are SC2086 (unquoted variable), SC2034 (unused variable), SC2046 (unquoted command substitution), SC2155 (declare and assign separately), and SC2154 (referenced but unassigned variable). SC2086 alone accounts for more warnings than the next four combined.

📋 Copy-Paste Snippets

All snippets are free, beginner-friendly, and production-tested. Find a script for your exact use case.

Browse All Snippets →
Related tools & scripts
Fix more script issues
intermediate · best practice
Bash Error Handling
free tool
Bash Exit Code Lookup
free tool
Bash Boilerplate Generator