• 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: how to get OS version with Shell script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >how to get OS version with Shell script? (From: "Horky Chen" <email@hidden>)

  • Prev by Date: how to get OS version with Shell script?
  • Next by Date: Re: how to get OS version with Shell script?
  • Previous by thread: how to get OS version with Shell script?
  • Next by thread: Re: how to get OS version with Shell script?
  • Index(es):
    • Date
    • Thread