Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bash - here-document at line delimited by end-of-file

Dude!May 25 2010 — edited May 28 2010
Hi,

I receive the following error when running a simple shell script:

./test: line 14: warning: here-document at line 8 delimited by end-of-file (wanted `EOF')

It works fine in KSH and SH, but not in Bash under Ubuntu 10.04, and I had a similar problems in the past with bash 2.05 under HP Tru64 unix.

The work-around is to remove the spaces/ident from the lines between << EOF .... EOF, but what is the reason?
[orcl@Pluto]$ cat test

set_orafra () {
orafra=`sqlplus -s / as sysdba << EOF
   set pagesize 0 lines 500 trimout on trimspool on
   set echo off feedback off timing off pause off heading off verify off
   whenever oserror exit failure
   whenever sqlerror exit failure
   select name from v\\$recovery_file_dest;
   EOF`
}

set_orafra
echo $orafra
bash -version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2010
Added on May 25 2010
10 comments
39,982 views