Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 386 Bytes

NumericalTests.md

File metadata and controls

14 lines (11 loc) · 386 Bytes

Numerical Tests

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