今天在配置fedora安装oracle11时在编写下面代码时出现了未预期的符号 then附近有语法错误。
下面是代码
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和[之间没有空格改变之后就行啦
在改变用户时不在显示错误
Linux中Shell脚本的符号说明:http://www.linuxdiyf.com/linux/1575.html
Linux Shell中的美元符号$:http://www.linuxdiyf.com/linux/7511.html