RosettaCodeData/Task/Integer-comparison/UNIX-Shell/integer-comparison-3.sh
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

9 lines
254 B
Bash

read -p "Enter two integers: " a b
if [ $a -gt $b ]; then comparison="greater than"
elif [ $a -lt $b ]; then comparison="less than"
elif [ $a -eq $b ]; then comparison="equal to"
else comparison="not comparable to"
fi
echo "${a} is ${comparison} ${b}"