Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

6.7. if

General syntax:
if (EXP) STMT1 [ else STMT2 ]
The if statement compares an integer-valued EXP to zero. It executes the first STMT if non-zero, or the second STMT if zero.
The if command has the same syntax and semantics as used in C.