SC2246 – ShellCheck Wiki

See this page on GitHub


This shebang specifies a directory. Ensure the interpreter is a file.

Problematic code:

echo "Hello World"

Correct code:

echo "Hello World"


The shebang specifies which file to use as an interpreter, but probably due to some kind of typo, your script's interpreter ends in a /, indicating a directory.

Ensure it points to a valid executable filename.



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