Re: how to get OS version with Shell script?
Re: how to get OS version with Shell script?
- Subject: Re: how to get OS version with Shell script?
- From: KOENIG Yvan <email@hidden>
- Date: Thu, 11 Jan 2007 16:18:12 +0100
Le 11 janv. 07 à 16:11:17, Horky Chen a écrit : Dear all,
Now, I want to write a script to check current version of Mac OS. How to do?
Hello
Most of the time I use this handler:
=====
on quelOS() try (* «event fndrgstl» = forme canonique de system attribute *) -- set hexData to «event fndrgstl» "sysv" set {hexData, hexString} to {system attribute "sysv", {}} repeat 4 times set hexString to ((hexData mod 16) as string) & hexString set hexData to hexData div 16 end repeat set OS_version to hexString as string on error set OS_version to "0000" (* retournera "0000" si "system attribute" n'est pas reconnu *) end try return OS_version end quelOS
Yvan KOENIG
|
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden