Hello members,
is there an alternative to using elif when testing for multiple OR conditions? For example:
I tried:
... but I get the unexpected operator error message.
Thanks for your help.
is there an alternative to using elif when testing for multiple OR conditions? For example:
Code:
if [ $FILE = 01 ] && [ $MNAME != "Blick" ]
then
echo "No match"
elif [ $FILE = 02 ] && [ $MNAME != "Flick" ]
then
echo "No match"
...
fi
I tried:
Code:
if [ [ $FILE = 01 ] && [ $MNAME != "Blick" ] || [ $FILE = 02 ] && [ $MNAME != "Flick" ] ]
then
echo "No match"
fi
... but I get the unexpected operator error message.
Thanks for your help.