[Solved] 0403-057 Syntax error `<' is not matched

curr_time=`date +%Y%m%d%H%M`
curr_date=`date +%Y%m%d`
zero=0
script_path="/home/wccuser1/wcc/Scripts/bulk_file_ftp"
file_dir="/home/wccuser1/wcc/Bulk_Files"
todays_file_count=`ls -ltr | grep $curr_date | awk '{print $9}' | wc -l`
todays_file=`ls -ltr | grep $curr_date | awk '{print $9}'`
if [ $todays_file_count -ne $zero ]; then
cd /home/wccuser1/wcc/Scripts/bulk_file_ftp
ftp -in -v IP <<eof>> /home/wccuser1/wcc/Scripts/bulk_file_ftp/bulk_file_ftp.log
user user_name password
bin
lcd /home/wccuser1/wcc/Scripts/bulk_file_ftp
mput *.csv
bye
fi

-----------------------------------------------------------------------
while executing got below error;

bulk_file_ftp.sh[8]: 0403-057 Syntax error at line 10 : `<' is not matched.

-----------------------------------------------------------------------

but i have tried simple ftp and its working

ftp -in -v ip <<eof1>> /home/wccuser1/wcc/Scripts/bulk_file_ftp/bulk_file_ftp.log
user user_name password
bin
lcd /home/wccuser1/wcc/Scripts/bulk_file_ftp
mput *.csv
bye
fi

Where is eof1 then? (but I just changed glasses and have some difficulties in accomodation...)

where's your closing 'eof' for the hear-doc?

but its working if i am using it outside "if" , sytex error is comming in if for "<"

....snip-snap....
ftp -in -v 10.77.8.21 <<eof>> /home/wccuser1/wcc/Scripts/bulk_file_ftp/bulk_file_ftp.log 
user misuser hutch1234 
bin 
lcd /home/wccuser1/wcc/Scripts/bulk_file_ftp 
mput *.csv 
bye
eof
fi

great , it worked , thanks a ton buddy

---------- Post updated 08-30-12 at 03:25 PM ---------- Previous update was 08-29-12 at 08:57 PM ----------

guys i got one problem in this, i dont want to ftp the file which has been ftpied once , how can i apply that condition filename is like "Block_wcc_nsn_superadmin_20120830051605.csv"