#!/bin/bash

#test

echo "----- 比较两数大小-----";

while (true) 

do

{

echo -n " 请输入a:";

read a;

echo -n " 请输入b:";

read b;

if [ $a -eq $b ]

then echo "a=b!";

elif [ $a -lt $b ]

then 

echo "a 小于 b || $a < $b ";

elif [ $a -gt $b ]

then

echo "a 大于 b || $a > $b ";

else

echo " 请检查输入字符的合法性,重新输入数字";

fi

echo "------------------";

}

done