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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Days difference between two dates Data469 Shell Programming and Scripting 6 03-26-2008 03:32 PM
Number of days between two distinct dates radheymohan UNIX for Advanced & Expert Users 1 10-16-2007 08:39 AM
list exe files modified before certain dates fremont UNIX for Dummies Questions & Answers 2 05-25-2007 09:29 AM
Difference between two dates in no of days ??? csaha Shell Programming and Scripting 1 01-13-2006 06:44 AM
days elapsed between 2 dates rkkiran UNIX for Dummies Questions & Answers 1 03-04-2002 12:45 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #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 ?
  #2 (permalink)  
Old 02-12-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,206
You are very unlikely get get anyone who has a script to do this is csh, and fewer again who would even bother trying, csh does not make doing this kind of thing easy.
  #3 (permalink)  
Old 02-12-2007
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
  
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,407
Perhaps take a look at http://www.unix.com/shell-programming-scripting/13904-date-manipulation.html#post51060
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0