Chinaunix

标题: bash shell [打印本页]

作者: nuclearxin    时间: 2008-01-21 10:11
标题: bash shell
tmtime=1615
export tmtime
if [ $tmtime -gt 0 -a $tmtime -lt 0730 ]; then
echo 'tmtime gt 0000 and lt 0730'
elif [ $tmtime -gt 1730  -a $tmtime -lt 1630 ]; then
echo 'tmtime gt 1730 and lt 1630 '
fi

执行无输出 为啥?
作者: merlin852    时间: 2008-01-21 10:21
$tmtime -gt 1730  -a $tmtime -lt 1630
有这样的数吗??
作者: nuclearxin    时间: 2008-01-21 10:38
唉~~~~~
克了
彻底克了
作者: linux_paly    时间: 2008-01-21 10:53
$tmtime -gt 1730  -a $tmtime -lt 1630      错误.




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2