今天在改一个脚本的时候突然遇到一个问题,SQLPLUS在登录的时候出现"<< is not matched "的错误
细细看来,原来是可以,经过改变以后只是位置不一样,改之前是在for循环的外面登录,改之后在
for循环内登录,但是我想也不应该影响才对的 
改之前的登录执行方式: sqlplus -s "username/password@alias" <<EOF
sqlplus -s "username/password@alias" <<EOF
 TRUNCATE TABLE ZHJS_TP_UNIQUE_ID;
TRUNCATE TABLE ZHJS_TP_UNIQUE_ID;
 exit
exit
 EOF
EOF
改了好几个方式还是不行,到最后实在受不了,用google搜索得了,烦的,晕死了,不搜还好,一搜
结果就出来了,呵呵,在论坛上别人是这么说的:
 The "END" tag to your so-called "here" document (started by the <<END expression)
The "END" tag to your so-called "here" document (started by the <<END expression) 
 needs to be at the left hand side. That means it must be placed at the start of
needs to be at the left hand side. That means it must be placed at the start of 
 line without any whitespace in front of it.
line without any whitespace in front of it. 
好了,按照上面的方法,改成如下的方式就可以了,高兴死了.......
 <<EOF sqlplus -s "username/password@alias"
<<EOF sqlplus -s "username/password@alias"
 TRUNCATE TABLE ZHJS_TP_UNIQUE_ID;
TRUNCATE TABLE ZHJS_TP_UNIQUE_ID;
 exit
exit
 EOF
EOF
还是得多查查,方能找到解决问题之方法....... 
	
posted on 2007-11-22 15:19 
LG 阅读(702) 
评论(0)  编辑 收藏 引用  所属分类: 
UnixProgram