码迷,mamicode.com
首页 > 系统相关 > 详细

shell脚本中 unary operator expected解决办法

时间:2016-03-10 18:57:55      阅读:354      评论:0      收藏:0      [点我收藏+]

标签:unary operator expected   shell报错   

if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ];
then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
fi

解决方案如下:

if [ "$USER" = "oracle" ]; then
    if [ "$SHELL" = "/bin/ksh" ]; then

        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
fi


或者

if [ [$USER  = "oracle" ]]; then
    if [ [$SHELL" = "/bin/ksh] ]; then

        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
fi

shell脚本中 unary operator expected解决办法

标签:unary operator expected   shell报错   

原文地址:http://ezioauditor.blog.51cto.com/8742351/1749621

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!