The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-15-2007
bsandeep_80 bsandeep_80 is offline
Registered User
 

Join Date: Jul 2007
Posts: 103
date issue-find prevoius date in a patricular format

Hi ,

I have written a shell script that takes the current date on the server and stores it in a file.

echo get /usr/home/data-`date '+%Y%d'`.xml> /usr/local/sandeep/GetFILE.ini

I call this GetFILE.ini file from an sftp program to fetch a file from /usr/home/ as location. The file is in this format data-20071115.xml
I have been succesfull in doing this.

This runs froms tuesday to friday. But on Monday i need to fetch Saturday and Sunday file and i don't know how it can be accomplished in this.

Can anyone help

Thanks,
Sandeep
Reply With Quote
Remove advertisements
!!
Forum Sponsor