linux shell IF判断时报not found错误解决方法

原来if判断那块有个坑,if 空格[ 空格$? -eq 0 空格]; if后面加空格,条件两边也得加空格,以下是数字比较和字符串比较例子
---------number
if [ 1 -eq 2 ];then
fi

--------string
if [ 'a' = 'v' ];then
fi


参考:
http://www.w2bc.com/Article/17610

猜你喜欢

转载自keren.iteye.com/blog/2309474