#!/bin/mywrapper
echo "Hello World"
#!/bin/mywrapper
# shellcheck shell=bash
echo "Hello World"
You have specified a shebang that ShellCheck doesn't recognize. This
can be due to invoking the script via a wrapper, specifying a dummy like
#!/bin/false
to prevent execution, or trying to check a
script for a non-Bourne shell or tool.
If this really is a sh/bash/dash/ksh script, please add a
shell
directive after the shebang to tell ShellCheck how to
interpret the script, as in the example. You can also specify the shell
with the -s
flag.
If this is a script in some other language, like
#!/bin/sed
for a sed
script, then sorry --
ShellCheck does not support sed
, awk
,
expect
scripts. It only supports Bourne style shell
scripts.
None.
https://www.gnu.org/software/bash/manual/html_node/Shell-Scripts.html https://mywiki.wooledge.org/BashProgramming?highlight=%28shebang%29#Shebang https://www.gnu.org/software/gawk/manual/html_node/Executable-Scripts.html https://mywiki.wooledge.org/BashPitfalls#On_UTF-8_and_Byte-Order_Marks_.28BOM.29
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.