[: -le: unary operator expected 错误
运行xx.sh时出现[: -le: unary operator expected这个错误后面经过排查得出错误代码段:declare -i ideclare -i s while [ "$i" -le "10" ] do s=s+i i=i+1echo "$i" done 错误原因:由于变量i初始化没赋值所以为空,那么就成了...