日期:2014-05-16  浏览次数:20740 次

执行shell脚本时报错command not found
我执行shell脚本的时候总是报这个错,不知道该怎么纠正,大家帮个忙吧。
下面是脚本代码:
if [[$1 -lt 1 -o -gt 10]]
then echo "error input"
else echo "input is:$1"
fi
报错如下:

这个到底是怎么回事?是shell脚本有问题吗?
脚本 shell command

------解决方案--------------------
if [ $1 -lt 1 -o $1 -gt 10 ] ; then
echo "error input"
else
echo "input is:$1"
fi