![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
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 |
| 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 |
| Time Manipulations | vanand420 | Shell Programming and Scripting | 10 | 07-22-2005 05:47 AM |
| date manipulations | user1 | Shell Programming and Scripting | 2 | 07-20-2004 01:22 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Date manipulations
hi
i am having a script in which i am supposed to extract data for three different dates...first date is current date second date is 15 days back third date is 40 days back for eg consider todays date 26062006 as first date then second date is 11062006 third date is 17052006 now in my script i can get first date using date command. but for second & third date i need to give values manually.due to this i am not able to automate my script. resently i got following commands... NOW_DATE=$(date) DATE_15=$(perl -e 'print scalar localtime(time-1296000)') DATE_40=$(perl -e 'print scalar localtime(time-3456000)') they do work but the problem in them is that format of month is in alphabets... i.e. month come as Aug or Sep.. etc.... where as i req it in numerical format as 08 or 09 etc ... Thanks in advance Rochit |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|