例1.任意输入二个数然后做判断
vi number.sh
#!/bin/bash
#written by lizheng
echo "please enter two number"
read a
read b
if test $a -eq $b
then echo "NO.1 = NO.2"
elif test $a -gt $b
then echo "NO.1 > NO.2"
else echo "NO.1 < NO.2"
fi
原文地址:http://11937277.blog.51cto.com/11927277/1880556