You can use specially defined operators with the if statement to compare numbers. The various operators that are available are listed in the table:
[[Operator Meaning]]
- -eq Equal to
- -ne Not equal to
- -gt Greater than
- -lt Less than
- -ge Greater than or equal to
- -le Less than or equal to
The syntax for comparing numbers is as follows:
exp1 -op exp2