在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博客 ” ,链接:http://blog.itpub.net/23034056/viewspace-629706/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23034056/viewspace-629706/