-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2148
gaellick edited this page Apr 13, 2020
·
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=bash
If neither of those options are possible or desirable, you can invoke ShellCheck with the --shell
switch:
shellcheck --shell=sh without-shebang.sh
See shellcheck --help
for a list of supported flavors (sh, bash, dash, ksh).