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