![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| while - comparision | sharif | Shell Programming and Scripting | 2 | 11-01-2007 01:58 AM |
| alphanumeric comparision | rakeshou | Shell Programming and Scripting | 3 | 09-27-2007 08:32 AM |
| date comparision | kotasateesh | UNIX for Dummies Questions & Answers | 3 | 07-20-2007 08:25 AM |
| Number comparision in AWK | vskr72 | UNIX for Dummies Questions & Answers | 1 | 11-22-2006 09:35 AM |
| SuSE comparision | lungs | Linux | 8 | 02-11-2005 09:36 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
date comparision
I am wriitng a shell script to compare a date in `date +%Y%m%d%H%M` to the output of `cat /var/adm/messages.0 | grep Temp |grep "CPU Fans" | cut -f1-4,19 -d' '` which looks like
Dec 2 11:30:57 79 Dec 2 11:37:58 79 Dec 2 11:44:58 79 Dec 2 11:50:59 79 Dec 2 11:58:00 79 Dec 2 12:05:01 79 Dec 2 12:11:01 79 Dec 2 12:18:02 79 Dec 2 12:21:02 80 How can I do this . My main issue is abbreviated month description . Many thanks in advance |
| Forum Sponsor | ||
|
|
|
|||
|
a=2007-05-10 (YYYY-DD-MM Format)
b=2007-06-10 These are the two given dates and I need to compare. (First It should split the dates into YYYY,dd,mm) The script should first compare years(2007 here).If both are same or if "a" is lesser than "b"(ie.suppose year in "a" is 2006),it should print correct.If "a"(ie. suppose year in a is 2008) is greater than b,then it should print error.Similarly for the dates(05 and 06). No need to check for the months(10). Regards, Dave Nithis. |
|||
| Google The UNIX and Linux Forums |