Getting error "syntax error at line 78 : `<' unmatched"

Hi Guys,

I have a following code in cm1.sh script.

cnt=`sqlplus -s <un>/<pwd> << !EOF
set heading off verify off pagesize 0
select count(*) from fnd_svc_components where component_name like '%Mailer%' and component_status != 'RUNNING';
exit;
!EOF`

echo $cnt

if [ $cnt -gt 0 ]; then
sqlplus -s <un>/<pwd> << !ABC
#spool wfmailers.txt
select component_name, component_status from fnd_svc_components where component_name like '%Mailer%' and component_status != '
RUNNING';
#spool off
exit;
!ABC
fi

I am getting following error when executing the script.

./cm1.sh[77]: syntax error at line 78 : `<' unmatched

Line 78 is sqlplus -s <un>/<pwd> << !ABC

I checked that there is no white space before '!ABC' and '!EOF'.

Pl. help.

Thanks in Adv

Sam

Guys, my problem got resolved. I did not check the trailing white space. I checked only at the begining of EOF and ABC.

Thanks for reading my thread anyways.

Sam