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

shell脚本报错,求大神帮忙解决
shell脚本内容如下

#!/bin/sh
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
ora_path='abp_query/bhp2pz_P@new_hss'

table_name='tmp_pldx_warn'

#获得文件地址

cd /home/abp/zjp
myFile="`date '+%Y%m%d'`*.csv"
 echo $myFile
#检查文件是否存在      
 if [ ! -f "myFile" ]; 
then 
#登录数据库       
 sqlplus -s $ora_path <<EOF
truncate table $table_name ;
insert into  $table_name valus(sysdate,'当日短信未推送');
        commit;
EOF
 fi
exit 0
报错代码为:Syntax error at line 15 : `<<' is not matched
------解决方案--------------------
检查看看最后的EOF有没有顶格写