今天在改一個腳本的時候突然遇到一個問題,SQLPLUS在登錄的時候出現(xiàn)"<< is not matched "的錯誤
細細看來,原來是可以,經(jīng)過改變以后只是位置不一樣,改之前是在for循環(huán)的外面登錄,改之后在
for循環(huán)內(nèi)登錄,但是我想也不應該影響才對的
改之前的登錄執(zhí)行方式:
sqlplus -s "username/password@alias" <<EOF
TRUNCATE TABLE ZHJS_TP_UNIQUE_ID;
exit
EOF
改了好幾個方式還是不行,到最后實在受不了,用google搜索得了,煩的,暈死了,不搜還好,一搜
結(jié)果就出來了,呵呵,在論壇上別人是這么說的:
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
line without any whitespace in front of it.
好了,按照上面的方法,改成如下的方式就可以了,高興死了.......
<<EOF sqlplus -s "username/password@alias"
TRUNCATE TABLE ZHJS_TP_UNIQUE_ID;
exit
EOF
還是得多查查,方能找到解決問題之方法.......
posted on 2007-11-22 15:19
LG 閱讀(696)
評論(0) 編輯 收藏 引用 所屬分類:
UnixProgram