Skip to content
koalaman edited this page Apr 8, 2017 · 2 revisions

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

Problematic code:

!/bin/sh
echo "Hello"

Correct code:

#!/bin/sh
echo "Hello"

Rationale:

You appear to be specifying an interpreter in a shebang, but it's missing the hash part. The shebang must always start with #!.

Even the name "shebang" itself comes from "hash" (#) + "bang" (!).

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