• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Comparing version strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comparing version strings


  • Subject: Re: Comparing version strings
  • From: has <email@hidden>
  • Date: Thu, 11 Dec 2008 22:50:36 +0000

SVV Satyanarayana wrote:

The following command give the version of mono:
do shell script "/usr/bin/mono -V | awk '/version/ {print $5}'"

I am getting the output as "1.2.5"
Now I want to compare the mono version whether it is greater than or
equal to 1.2.5 using script.
How to check it through Apple Script.


Assuming a simple numbering scheme and Tiger or later:

considering numeric strings
	"1.2.5" < "1.11.5"
end
--> true


-- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Comparing version strings
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Next by Date: Re: Comparing version strings
  • Previous by thread: Re: Code Signing.
  • Next by thread: Re: Comparing version strings
  • Index(es):
    • Date
    • Thread