比较SHELL里面的大小
#!/bin/bashif [ $1 -gt $2 ]
then echo "$1>$2"
else echo "$2>$1"
fi
# 数字判断一些命令
#-gt是大于的意思
#-lt是小于
#-eq是等于
#-ne是不等于
#-ge是大于等于
#le是小于等于
(#!/ bin/bash
if [ $1 -gt $2 ]
then echo "$1>$2"
else echo "$2>$1"
fi
#Digital judgment some commands
#-GT means greater than
#-Lt is less than
#-EQ is equal to
#-NE is not equal to
#-Ge is greater than or equal to
#Le is less than or equal to
)
页:
[1]