\
before line feeds to break lines in [ ]
.[ "$filename" =
"$otherfile" ]
[ "$filename" = \
"$otherfile" ]
Bash/ksh [[ ]]]
can include line breaks anywhere, but [ ]
requires that you escape them. If you are writing a multi-line [ .. ]
statement, make sure to include these escapes. If the [ ]
is supposed to be on a single line, make sure the ]
is there.
None
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.