CmdID

CmdID / Commands

shellcheck

Statically check shell scripts for errors, usage of deprecated/insecure features, and bad practices. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Check a shell script

shellcheck path/to/script.shIdentify

Check a shell script interpreting it as the specified shell dialect (overrides the shebang at the top of the script)

shellcheck --shell sh path/to/script.shIdentify

Ignore one or more error types

shellcheck --exclude SC1009,SC1073,... path/to/script.shIdentify

Also check any sourced shell scripts

shellcheck --check-sourced path/to/script.shIdentify

Display output in the specified format (defaults to tty)

shellcheck --format tty path/to/script.shIdentify

Enable one or more optional checks

shellcheck --enable add-default-case,avoid-nullary-conditions,... path/to/script.shIdentify

List all available optional checks that are disabled by default

shellcheck --list-optionalIdentify

Adjust the level of severity to consider (defaults to style)

shellcheck --severity error path/to/script.shIdentify