Added alternative of using a ShellCheck directive. Tweaked language.

Renee Margaret McConahy
2019-11-25 08:01:47 -05:00
parent 7ef9975da7
commit 4b5204ecc8

@@ -1,10 +1,16 @@
Add shebang to the top of your script:
Add a shebang line to the top of your script:
```bash
#!/bin/bash
```
Alternatively, if that is not possible / desirable, you can use the `--shell` switch:
Or, for scripts that will not be executed (*e.g.*, `~/.bashrc`), use a directive:
```bash
# shellcheck shell=sh
```
If neither of those options are possible or desirable, you can invoke ShellCheck with the `--shell` switch:
```bash
shellcheck --shell=bash without-shebang.sh
```