Comparing Numbers

  • + 0 comments
    read a 
    read b 
    (( a > b )) && echo "X is greater than Y  " && exit 0
    (( a == b )) && echo "X is equal to Y   " && exit 0
    (( a < b )) && echo "X is less than Y  " && exit 0