Skip to content
koalaman edited this page Apr 8, 2017 · 1 revision

Remove spaces between # and ! in the shebang.

Problematic code:

# !/bin/sh
echo "Hello World"

Correct code:

#!/bin/sh
echo "Hello World"

Rationale:

The script has spaces between the # and ! in the shebang. This is not valid.

Remove the spaces so the OS can correctly recognize the file as a script.

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
You can’t perform that action at this time.