Skip to content
Renee Margaret McConahy edited this page Nov 25, 2019 · 15 revisions

Add a shebang line to the top of your script:

#!/bin/bash

Or, for scripts that will not be executed (e.g., ~/.bashrc), use a directive:

# shellcheck shell=sh

If neither of those options are possible or desirable, you can invoke ShellCheck with the --shell switch:

shellcheck --shell=bash without-shebang.sh

See shellcheck --help for a list of supported flavors.

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally