ITPub博客

首页 > Linux操作系统 > Linux操作系统 > unary operator expected

unary operator expected

原创 Linux操作系统 作者:jadesuper 时间:2010-03-17 14:53:40 0 删除 编辑

  在centos系统从root用户切换到oracle用的时候,总是提示 :

-bash- : :[:  unary operator expected

能切换成功,就是总提示上面这个,

后来找到原因,在安装oracle软件的时候,曾在/etc/profile里设置如下内容:

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

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23034056/viewspace-629706/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2010-01-16

  • 博文量
    5
  • 访问量
    6753