日期:2014-05-16  浏览次数:20757 次

linux as5下用./test.sh执行SH时报错,syntax error near unexpected token '
点击右边红色标题查看本文完整版:linux as5下用./test.sh执行SH时报错,syntax error near unexpected token '('

linux as5下用./test.sh执行SH时报错,syntax error near unexpected token '('
test.sh中的内容为:
#!/bin/sh
cd /opt/oracle/dbbak
rm -rf /opt/oracle/dbbak/dbbak.dmp
exp test/test tables=(t_test) file=/opt/oracle/dbbak/dbbak.dmp log=/opt/oracle/dbbak/dbexp.log


------解决方法--------------------
每一步分开执行了吗?每行命令后面加下“;”
------解决方法--------------------
把() 给去了,

exp test/test tables=t_test file=/opt/oracle/dbbak/dbbak.dmp log=/opt/oracle/dbbak/dbexp.log
------解决方法--------------------
exp test/test tables=\(t_test\) file=/opt/oracle/dbbak/dbbak.dmp log=/opt/oracle/dbbak/dbexp.log