• 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: One for the experts: Serial Number of computer using Applescript Studio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One for the experts: Serial Number of computer using Applescript Studio


  • Subject: Re: One for the experts: Serial Number of computer using Applescript Studio
  • From: Chris Janton <email@hidden>
  • Date: Sat, 18 Jun 2005 08:24:15 -0700

On Jun 17, 2005, at 15:10, email@hidden wrote:

set Profile to do shell script "/usr/sbin/system_profiler SPHardwareDataType"
set SN_Start to ((offset of "Serial Number" in Profile) + 15)
set Partial to text SN_Start thru (length of Profile) of Profile
set SN_End to offset of " " in Partial
set sn to text 1 thru (SN_End - 2) of Partial



since you're already using the shell you could do it this way as well

/usr/sbin/system_profiler SPHardwareDataType | grep Seria | awk '{ print $3 }'

8)
----------------------------------
Chris Janton  - face at CentosPrime dot COM
Netminder for Opus1.COM


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: [ANN] XNet 1.0
  • Next by Date: Re: [ANN] XNet 1.0
  • Previous by thread: Re: [ANN] XNet 1.0
  • Next by thread: Fun with dates...
  • Index(es):
    • Date
    • Thread