diff --git a/SC2246.md b/SC2246.md new file mode 100644 index 0000000..d6d6e42 --- /dev/null +++ b/SC2246.md @@ -0,0 +1,28 @@ +## This shebang specifies a directory. Ensure the interpreter is a file. + +### Problematic code: + +```sh +#!/bin/sh/ +echo "Hello World" +``` + +### Correct code: + +```sh +#!/bin/sh +echo "Hello World" +``` +### Rationale: + +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. + +### Exceptions: + +None + +### Related resources: + +* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! \ No newline at end of file