SC1113 – ShellCheck Wiki

See this page on GitHub

Sitemap


Use #!, not just #, for the shebang.

Problematic code:

# /bin/bash
echo "Hello World"

Correct code:

#! /bin/bash
echo "Hello World"

Rationale:

You appear to be specifying a shebang, but missing the bang (i.e. !). The shebang should always be on the form #!/path/shell.

Exceptions:

None.


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