Condition tests using the if/then construct may be nested. The net result is equivalent to using the && compound comparison operator.
if [ condition1 ] then if [ condition2 ] then do-something # But only if both "condition1" AND "condition2" valid. fi fi |
Example 34-4 demonstrates a nested if/then condition test.