Re: Comparing version strings
Re: Comparing version strings
- Subject: Re: Comparing version strings
- From: Luther Fuller <email@hidden>
- Date: Thu, 11 Dec 2008 08:18:47 -0600
On Dec 11, 2008, at 8:05 AM, 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.
Here's what I use ...
set AppleScript's text item delimiters to {"."}
(text items of (system version of (system info)) & {"0", "0", "0"})
1000000 * (item 1 of the result) + 1000 * (item 2 of the result) +
(item 3 of the result)
if the result < 10005000 then
-- do stuff for Tiger only
end if
You could use your 'do shell script ...' in place of my '(system
version of (system info))'.
Hope this helps.
_______________________________________________
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