INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Syntax error at line 55 : `<<' unmatched

Syntax error at line 55 : `<<' unmatched

(OP)
Hello All,

Can you help review this with a fresh set of eyes.
Not sure where the error is, but the output error is:
E_PIN
ESS_USER
ESS_USER_SER_ROLE
./spx_repair_sfgi_2.sh[37]: syntax error at line 55 : `<<' unmatched

Below is the code in full:

CODE --> script

#!/bin/ksh

 dbname=sfgi
 export ORACLE_SID=$dbname
 export ORACLE_HOME=/orahome/app/oracle/product/10.2.05/dbq413
. /usr/sislocal/$dbname/to$dbname

#log into database
sqlplus -s splex_2/password << EOF


 set pagesize 0
 set linesize 4000
 set feedback off
 set trimspool on

 spool rowcount.txt;

select source_name from splex_2.count_match_vw;
 spool off;
EOF
mailx -s "The following tables have rowcount mismatch in Shareplex SFGI<->CTXI Environments"  email@email.com<< END
`cat rowcount.txt`
END
     # Create the file extensions and files to be used:
     basename=spsfgi
     now=`date '+%y-%m-%d_%H-%M-%S'`
     repair_dir=/orahome/app/oracle/home
     repairfile=$repair_dir/$basename.$now.sh
     logfile=$repair_dir/$basename.$now.log
     resultfile=$repair_dir/$basename.$now.out

     #remove /" from table names.
     #`sed 's/"//g'rowcount.txt>tblname.tx`

     #loop through tblname.txt
     for tblname in `cat /orahome/app/oracle/home/rowcount.txt`
    do
     #set shareplex environment

     `/orahome/app/SharePlex/10g/prod/. ./spenv_2_sfgi.sh`
     #export SP_SYS_PRODDIR=/orahome/app/SharePlex/10g/prod
     #export SP_SYS_VARDIR=/orahome/app/SharePlex/10g/var2150_sfgi
     #export SP_COP_UPORT=2150
     #export SP_COP_TPORT=2150
     #export SP_SYS_HOST_NAME=seq
     export IW_HOME=$SP_SYS_PRODDIR/util


     #log into Shareplex Console
     #`cd $SP_SYS_PRODDIR/bin`
     `/orahome/app/SharePlex/10g/prod/bin/./sp_ctrl`
     repair $tblname
     exit
     mailx -s "Table following table is now repairing in Shareplex SFGI<->CTXI Environment"  email@email.com<< END
     `cat $tblname`
     END 

RE: Syntax error at line 55 : `<<' unmatched

Hi

The closing delimiter of the here-document started with << must not be indented.
Unless your shell allows you to start it with <<-, then indentation with tab may be used.
Or if has support for starting with <<#, then indentation with spaces may also be used.

Feherke.
feherke.github.io

RE: Syntax error at line 55 : `<<' unmatched

(OP)
Thanks for the suggestion....
Though my code has now move past that after implementing your suggestion.
However, new error shows that it just hang once it goes into Shareplex Control panel:


#log into Shareplex Console
#`cd $SP_SYS_PRODDIR/bin`
`/orahome/app/SharePlex/10g/prod/bin/./sp_ctrl` << EOSP #changes made here
repair $tblname
exit
EOSP #changes made here
mailx -s "Table following table is now repairing in Shareplex SFGI<->CTXI Environment" email@email.com<< END
`cat $tblname`
END

done
"spx_repair_sfgi_2.sh" 61 lines, 1656 characters
seq1:oracle::~-> ./spx_repair_sfgi_2.sh
SIC.E_PIN
SIC.ESS_USER
SIC.ESS_USER_SERVICE_ROLE # it hangs after here

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close