diff --git a/2148.md b/2148.md new file mode 100644 index 0000000..da3d49c --- /dev/null +++ b/2148.md @@ -0,0 +1,22 @@ +## Include a shebang (#!) to specify the shell. + +### Problematic code: + + echo "Hello World" + +### Correct code: + + #!/bin/sh + echo "Hello World" + +### Rationale: + +ShellCheck noticed that your file does not start with a shebang. Shebangs are good for a number of reasons: + +* They allow scripts to be executed outside of interactive prompts. +* They ensure the script is executed by the correct shell. +* Editors and utilities (including shellcheck) use it to determine the file type. + +### Contraindications + +For checking snippets, use `shellcheck -e 2148`. This is the default for [shellcheck.net](http://www.shellcheck.net). \ No newline at end of file