Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax error at line 55 : `<<' unmatched

Status
Not open for further replies.

tekpr00

IS-IT--Management
Jan 22, 2008
186
CA
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:
#!/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
 
Hi

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


Feherke.
feherke.github.io
 
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:eek:racle::~-> ./spx_repair_sfgi_2.sh
SIC.E_PIN
SIC.ESS_USER
SIC.ESS_USER_SERVICE_ROLE # it hangs after here
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top