greater than in bash code example
Example 1: bash if greater than
if (( a > b )); then
...
fi
if [ "$a" -gt "$b" ]; then
...
fi
Example 2: greater than in script
-eq
is equal to
if [ "$a" -eq "$b" ]
-ne
is not equal to
if [ "$a" -ne "$b" ]
-gt
is greater than
if [ "$a" -gt "$b" ]
-ge
is greater than or equal to
if [ "$a" -ge "$b" ]
-lt
is less than
if [ "$a" -lt "$b" ]
-le
is less than or equal to
if [ "$a" -le "$b" ]
Example 3: bash if larger than
if (( a > b )); then
...
fi
if [ "$a" -gt "$b" ]; then
...
fi