当前位置: 代码迷 >> Oracle管理 >> shell脚本出错,求大神帮忙解决
  详细解决方案

shell脚本出错,求大神帮忙解决

热度:37   发布时间:2016-04-24 04:21:09.0
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有没有顶格写
  相关解决方案