在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