view counter

AND and OR operations in shell script

Thanks to Sandeep for this story

 

view counter
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

Read the entire article at its source

view counter