Pattern: Use of ||
in [ .. ]
test expression
Issue: -
||
cannot be used in a [ .. ]
test expression. Instead, make two [ .. ]
expressions and put the ||
between them.
Example of incorrect code:
[ "$1" = "-v" || "$1" = "-help" ]
Example of correct code:
[ "$1" = "-v" ] || [ "$1" = "-help" ]