shell部分知识点
终端输入两个数,判断两数是否相等,如果不相等,判断大小关系
#!/bin/bash
read num1
read num2
if test $num1 -eq $num2
then
echo $num1=$num2
elif test $num1 -gt $num2
then
echo $num1
else
echo $num2
fi
#!/bin/bash
read num1
read num2
if test $num1 -eq $num2
then
echo $num1=$num2
elif test $num1 -gt $num2
then
echo $num1
else
echo $num2
fi