`<' is not matched. in Borne Shell

OS: AIX 4.1, Hardware IBM/RS6000, Script: Borne(i believe)
Error:hot[143]: 0403-057 Syntax error at line 150 : `<' is not
matched.
My Script: hot
Code in Question: if is line 143, svrmgrl is line 150, << is in question
DYNSIZE=`ls -al $TSLIST | awk '{print $5}'`
echo "dynsize = $DYNSIZE"
if [ $DYNSIZE = 0 ]; then
  echo "${JOBNAME_SHORT}: No tablespaces in backup mode."
else
  echo "DEBUG: altering ts end backup "
  cat $TSLIST | while read TSNAME
  do
    echo "DEBUG: end backup1 "
    svrmgrl <<EOF
    connect internal
    alter tablespace $TSNAME end backup;
    quit
    EOF
    echo "DEBUG: end backup2"
  done
fi

This works in the prior two usages?
Example:
#
# build database file list
#
echo "DEBUG: build database file list"
echo "${JOBNAME_SHORT}: building dynamic parameter file."
sqlplus -s > $DBBACKUP <<EOF
sysop2/backup
set pagesize 0
set linesize 2048
set heading off
set feedback off
column TNAME format a20
column FNAME format a80
select tablespace TSNAME, cmdtext COMMAND, subseq SEQENCE
    from sysop2.admin_backup
    order by subseq;
quit
EOF
cat $DBBACKUP  

Question:
- how do i resolve this error
LVL 2
banickiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ozoConnect With a Mentor Commented:
Don't indent the
EOF
0
 
banickiAuthor Commented:
I've already tried that...  
Will try again...
0
 
banickiAuthor Commented:
i removed the indentation...
same error...
got to thinking if its that sensititive about spaces...
why not check for trailing spaces...
bingo...
Thanks...
Terry
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
banickiAuthor Commented:
do you have to post an answer to get points?
0
 
banickiAuthor Commented:
thanks...
now that i know i can except comments as an answer...
i can clean up all these notes...
thanks again...
terry
0
 
ozoCommented:
If you want to include spaces around the EOF at the end, you can include a matching number of spaces around the EOF ar the <<
   svrmgrl <<'   EOF '
   quit
   EOF
0
 
banickiAuthor Commented:
Cool!
I got volunteered to write the oracle online backup scripts.
Found some sample scripts in the oracle documentation.
Thought that would be a good place to start...
I cut it out of the doc and pasted it in to notepad...
then ftp'd it to the AIX server... Then the fun began...
a ton of code, and none of it worked...
but thanks to you and helver, its running, tested, and
going production tomorrow.  
I greatly appreciated you time.
Terry
0
All Courses

From novice to tech pro — start learning today.