BASH : Comparison of values 30 May 201730 May 2017 Fabien Linux In a if test, you often have to compare the value of two variable of the value a variable against a fixed value is equal to if [ "$a" -eq "$b" ] if [ "$a" -eq "35" ] . not equal to if [ "$a" -ne "$b" ] . is greater than if ["$a" -gt "$b" ] . is greater or equal than if [ "$a" -ge "$b" ] . is lower than if [ "$a" -lt "$b" ] . is lower or equal than if [ "$a" -le "$b" ]