Operator | Description | Example |
-eq | Is Equal To | if [ $1 -eq 200 ] |
-ne | Is Not Equal To | if [ $1 -ne 1 ] |
-gt | Is Greater Than | if [ $1 -gt 15 ] |
-ge | Is Greater Than Or Equal To | if [ $1 -ge 10 ] |
-lt | Is Less Than | if [ $1 -lt 5 ] |
-le | Is Less Than Or Equal To | if [ $1 -le 0 ] |
== | Is Equal To | if (( $1 == $2 )) [Note: Used within double parentheses] |
!= | Is Not Equal To | if (( $1 != $2 )) |
< | Is Less Than | if (( $1 < $2 )) |
<= | Is Less Than Or Equal To | if (( $1 <= $2 )) |
> | Is Greater Than | if (( $1 > $2 )) |
>= | Is Greater Than Or Equal To | if (( $1 >= $2 )) |
No comments:
Post a Comment