Shell Programming/Arithmetic comparison

From Wikibooks, open books for an open world
Jump to: navigation, search


  expression1 -eq expression2  equal
  expression1 -ne expression2  not equal
  expression1 -gt expresssion2  greater than
  expression1 -ge expression2 greater than or equal to
  expression1 -lt expression2  less than
  expression1 -le expression2 less than or equal to