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)