-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC1140
Vidar Holen edited this page Dec 7, 2020
·
2 revisions
[ "$1" ] input="$1"
[ "$1" ] && input="$1"
ShellCheck found characters (other than redirections) after the ]
or ]]
in a test expression. This is not valid.
This sometimes happens when there was an additional expression or command, but joining ||
or &&
is missing. Alternatively, it could happen due to typos (like [[ $1 ]]]
with an extra ]
), or generally from malformed test expressions.
None
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!