The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 01-26-2008
lucaswoods lucaswoods is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 9
At the top of the script:
read LASTDATE < .last_date

During the FTP session:
del $LASTDATE.backup.sql.enc.gz

After the FTP session:
echo $DATE > .last_date

Of course you will need some conditional logic there to deal with .last_date not existing... you could create the first .last_date file manually yourself. If you need help with that as well let us know.