The UNIX and Linux Forums  

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




Thread: Date help
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 01-29-2008
innocent innocent is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 10
Date Help

Thanks for all ur inputs.

Looks like i have not state my requirement clearly.
I am aware of
date --date='next day' "+%Y%m%d" .
This will give next date of the unix system date as an output in YYYY/mm/dd format.

But what i am looking is to get the next day or next month for any date which the user is passing as a parameter.

something like this below

mydate=$1
date --date $mydate +%m%d%Y -d ýesterday (this does not work)

but i want next day or 3rd day of mydate

Is it possible ? if so pls give me the soln.

Thks