You are viewing a single comment's thread. Return to all comments →
read num1 read num2
if [ num2 ]; then echo "X is greater than Y" elif [ num2 ]; then echo "X is equal to Y" else echo "X is less than Y" fi
Seems like cookies are disabled on this browser, please enable them to open this website
Comparing Numbers
You are viewing a single comment's thread. Return to all comments →
read num1 read num2
Compare the numbers
if [ num2 ]; then echo "X is greater than Y" elif [ num2 ]; then echo "X is equal to Y" else echo "X is less than Y" fi