Skip to content
Joachim Ansorg edited this page Nov 12, 2021 · 2 revisions

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

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