|
/||
/&&
should be at the
end of the previous one.dmesg
| grep "error"
dmesg |
grep "error"
ShellCheck has found a line that unexpectedly started with
|
, ||
or &&
. This usually
happens when a line is broken incorrectly.
When breaking around a |
, ||
or
&&
, there are two options:
dmesg
is a
complete command by itself, but dmesg |
is not so the shell
knows to continue on the next line.\
at the end of the previous line to explicitly
tell the shell to continue on the next.In v0.7.2 and below, this warning triggered incorrectly when starting
a line with &>
. In these versions, you can either ignore the warning, or move the redirection after the
command name.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.