Re: Comparing version strings
Re: Comparing version strings
- Subject: Re: Comparing version strings
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 11 Dec 2008 19:38:35 -0500
Thanks, Chris and has. I didn't know "considering numeric strings"
would work across separated numeric fields within the string.
Definitely the way to go if you can assume at least Tiger.
On 12/11/08, has <email@hidden> wrote:
> 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
>
--
Sent from Gmail for mobile | mobile.google.com
Mark J. Reed <email@hidden>
_______________________________________________
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