7.4. Nested if/then Condition Tests

Condition tests using the if/then construct may be nested. The net result is equivalent to using the && compound comparison operator above.

   1 if [ condition1 ]
   2 then
   3   if [ condition2 ]
   4   then
   5     do-something  # But only if both "condition1" and "condition2" valid.
   6   fi  
   7 fi

See Example 34-4 for an example of nested if/then condition tests.

    Place for this material granted by linux and technology portal www.net4me.ru