The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



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
calculate 13 months ago andrea_mussap Shell Programming and Scripting 4 11-21-2007 08:14 PM
calculate 13 months ago andrea_mussap Shell Programming and Scripting 3 11-16-2007 03:18 PM
some months ego big123456 Shell Programming and Scripting 8 07-27-2005 03:31 AM
DNS Help - Been trying to do this for months matt2kjones IP Networking 16 09-28-2002 09:46 AM
Subtracting Two months from date jwatson12 UNIX for Dummies Questions & Answers 3 09-13-2002 01:06 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-11-2004
pankschawla pankschawla is offline
Registered User
  
 

Join Date: Aug 2003
Posts: 7
Comparing two months

Hi all,

Using shell script and awk statements, I manage to get the month and year of the Patch Bundle installed on the system. Now I have to compare month and year of Patch Bundle installed to the Patch Bundle which is desired on the workstation. I am able to do easily comparison of year but not of month. Can anyone suggest how to do this???

In short I have to accomplish:
if [ "march" greater than "november" ];
then
echo "jjjjjjjj"
else
echo "iiiiiiii"
fi

Thanx for your cooperation and help
Regards,
Pankaj
  #2 (permalink)  
Old 02-11-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Use a case statement to convert month to numeric form.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0