![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Compare date from db2 table to yesterday's Unix system date | sasaliasim | Shell Programming and Scripting | 9 | 12-01-2008 11:37 PM |
| Perl: Extracting date from file name and comparing with current date | MKNENI | Shell Programming and Scripting | 4 | 03-26-2008 04:01 PM |
| date issue-find prevoius date in a patricular format | bsandeep_80 | UNIX for Advanced & Expert Users | 3 | 11-15-2007 08:42 PM |
| Changing Creation Date to a Prespecified Date of a File In Unix | monkfan | UNIX for Dummies Questions & Answers | 4 | 11-28-2006 07:15 AM |
| a simple way of converting a date in seconds to normal date | travian | HP-UX | 2 | 11-23-2006 12:25 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Date help
Hi,
Pls can some one help. Need a script which will read a command line $1 which is a date, then based on the date in $1 calc next day or previous day etc and output the result in YYYYMMDD format. e.g abc.sh 01/01/2008 output required is 01/01/2008 + 1day = 01/02/2008 or 01/01/2008 + 3days = 01/04/2008 is it possible using mydate=date -d "$1" +%m%d%y j="$mydate" -d "next day" +%m%d%y (this does not work) Thks in adv.. |
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|