![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Help needed with date | chris1234 | UNIX for Dummies Questions & Answers | 16 | 03-31-2008 04:15 PM |
| Help Needed in Date Condition !! | ranga27 | Shell Programming and Scripting | 24 | 03-28-2008 09:24 AM |
| help needed in date format | ali560045 | Shell Programming and Scripting | 1 | 01-14-2008 10:05 AM |
| Help needed - Replacing all date & time occurrences in a file with a string using Sed | Hema_M | Shell Programming and Scripting | 4 | 11-17-2005 01:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help needed on Date command
Hi,
I am facing one problem with date command.Actually I want to use this command to get the last month,not the current month..OK,I can do current month - 1 and give special condition for january,But this time i need last month as strings like January,februaury,march etc... There is option available to get the month in the string form and that is `date +%B` but this will give you the current month. I can definitely do what i want with 12 cases one for each month but i want to avoid that.Please help me if anyone has any idea to implement this with out using 12 conditions. Thanks, -Nikunj |
|
||||
|
|
|
||||
|
get your self gnu date if you do not have it already. it actualy makes a readable script.
date Fr Jul 7 17:47:56 CEST 2006 date -d"1 month ago" Mi Jun 7 17:48:21 CEST 2006 since i learned about this some year ago i drop all date hacks (do you know what you can do with $TZ ? ![]() |
|
||||
|
Thanks grumpf,
Actaully i was looking for some similar options if i could..But the problem is I am using SunOs 5.8 and i am not authorized to add any package to the server.I tried this command and it didn't work.. It seems you have done lot of stuff on date command,Can you tell me is there any way to use date command to read from some variable not from the system,I mean if i can give my inputs to date command with out disturbing any system configurations? Thanks in advance.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|