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 -->
  #1 (permalink)  
Old 02-12-2007
Raynon Raynon is offline
Registered User
  
 

Join Date: Sep 2006
Location: Sg
Posts: 350
Find number of days and list out the dates in between

Hi All,

Can unix cshell list out the number of days between 070201 and 070205 (format is yymmdd) and list out all the dates in between in similiar format.

set startdate = `date '+%y%m%d'` #eg 070201
set enddate = `date '+%y%m%d'` #eg 070205

i would expect the number of days to be 5 days inlcusive.
and i would expect the scripte to list out the dates between them like
070201
070202
070203
070204
070205


can anybody help ?