-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2148
Renee Margaret McConahy edited this page Nov 25, 2019
·
15 revisions
Add a shebang line to the top of your script:
#!/bin/bash
Or, for scripts that will not be executed (e.g., ~/.bashrc
), use a directive:
# shellcheck shell=sh
If neither of those options are possible or desirable, you can invoke ShellCheck with the --shell
switch:
shellcheck --shell=bash without-shebang.sh
See shellcheck --help
for a list of supported flavors.