I have a situation wherein i have to check multiple conditions in an 'if' based on some variables. I have given the condition as
if [ ("${VAR1}" == "${VAR2}") || ("${VAR3}" != "${VAR4}") ]
then
.
.
else
.
.
fi
On running the script I am getting a syntax error
syntax error at line number : `(' unexpected
Addition of OR condition (||) gives me this error otherwise both the if conditions work individually.
I am using K shell
if [ ("${VAR1}" == "${VAR2}") || ("${VAR3}" != "${VAR4}") ]
then
.
.
else
.
.
fi
On running the script I am getting a syntax error
syntax error at line number : `(' unexpected
Addition of OR condition (||) gives me this error otherwise both the if conditions work individually.
I am using K shell