Comparing Numbers

  • + 0 comments
        read X
        read Y
    
        if (( X > Y )); then 
                echo "X is greater than Y"
        elif (( X == Y )); then 
                echo "X is equal to Y"
        elif (( X < Y )); then 
                echo "X is less than Y"
        fi