install.sh: 12: [: unexpected operator

Ubuntu执行Shell脚本时提示错误:

root@MyLuoLuo:~/webapp/zcp-7.1.1-37812-ubuntu-12.04-i386# sh install.sh
install.sh: 12: [: unexpected operator

代码:

if [ ! -z "$1" -a "$1" == "-config" ]; then
        INSTALL=0

解决方法:

sudo dpkg-reconfigure dash  #选NO

3 Replies to “install.sh: 12: [: unexpected operator”

回复 丶花落若相惜 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据