SC2187 – ShellCheck Wiki

See this page on GitHub


Ash scripts will be checked as Dash. Add # shellcheck shell=dash to silence.

Problematic code:

echo "Hello World"

Correct code:

# shellcheck shell=dash
echo "Hello World"


ShellCheck has no first class support for ash, but it does support its Debian fork dash and defaults to this whenever ash is specified.

Unfortunately, while the two are similar, they are not completely compatible. For example, ash supports echo -e but dash does not, so ShellCheck will incorrectly warn about it.

You can use a directive to let ShellCheck know you're aware of this problem.



ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.