And, OR operation in shell script called as compound comparisons.
“-a” stands for logical AND operator,
“-o” stands for logical OR operator.
Usage/Example:
For AND
if [ $expr1 -a $expr2 ]
For OR
if [ $expr1 -o $expr2 ]
-Sany
And, OR operation in shell script called as compound comparisons.
“-a” stands for logical AND operator,
“-o” stands for logical OR operator.
Usage/Example:
For AND
if [ $expr1 -a $expr2 ]
For OR
if [ $expr1 -o $expr2 ]
-Sany