centOs 在 设置了oracle安装环境后,出现了 "unary operator expected",原因是修改了/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
当$SHELL 为空时,语句就变成了 if?[??="/bin/ksh"?],因此出错,网上搜了解决方案,改成:
if [ "$USER" = "oracle" ]; then
if [ "$SHELL" = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi