Pattern: Use of -a
in [[ .. ]]
expression
Issue: -
-a
for logical AND is not supported in a [[ .. ]]
expression. Use &&
instead.
Example of incorrect code:
[[ "$1" = "-v" -a -z "$2" ]]
Example of correct code:
[[ "$1" = "-v" && -z "$2" ]]