dont want to ftp file which has been already ftpied

 
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}'`
log_count=`grep $curr_date bulk_file_ftp.log |wc -l`
if [ $todays_file_count -ne $zero ]; then
cd /home/wccuser1/wcc/Scripts/bulk_file_ftp
ftp -in -v 10.99.99.99 <<eof1>> /home/wccuser1/wcc/Scripts/bulk_file_ftp/bulk_file_ftp.log
user username air1234
bin
lcd /home/wccuser1/wcc/Scripts/bulk_file_ftp
cd /wcc_cdr01/misuser/wcc/ftp/log_file_ftp/10.77.0.21
mput *$curr_date*
cd /wcc_cdr01/misuser/wcc/ftp/log_file_ftp/10.77.0.23
mget *$curr_date*
bye
eof1
fi
fi

this code has one constraint , i do not want to ftp the file which has been once ftpied , what changes do i require

I can se that you are writing the out put of ftp command to a log file... Cant you just check for the last file which got ftp'ied and start from that file onwards....

selecting the file from last file onwards u can take many routes... wither awk,sed etc (once u list the file names)....

Give it a try if wont work please let us know...

k boss, i will try that, thanks