||
-o
And variations, like "Use && instead of and".
&&
and
if [ "$1" = "-v" ] -o [ -n "$VERBOSE" ] then echo "Verbose log" fi
if [ "$1" = "-v" ] || [ -n "$VERBOSE" ] then echo "Verbose log" fi
You have a [ .. ] or [[ .. ]] test expression followed by -o/-a (or by Python-style or/and).
[ .. ]
[[ .. ]]
-a
or
-o and -a work inside [ .. ], but they do not work between them. The Python operators or and and are never recognized in Bash.
To join two separate test expressions, instead use || for "logical OR", or && for "logical AND".
None
There was an error while loading. Please reload this page.