Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Perl on OSX > Re: Detecting O...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 13 of 16 Topic 999 of 1076
Post > Topic >>

Re: Detecting OS X version from perl

by brian.d.foy@[EMAIL PROTECTED] (Brian D Foy) Nov 19, 2007 at 08:22 PM

In article <4740E9A3.9030903@[EMAIL PROTECTED]
>, Michael Barto
<mbarto@[EMAIL PROTECTED]
> wrote:

> Everyone has suggested  "system_profiler" for the hardware stuff. But it

> appears that I will need do some parsing with
>  $ grep -A1 'BundleShortVersion' 
> /Library/Receipts/*.pkg/Contents/version.plist  | grep string

Why are you looking thare for hardware info?

You don't really need to do any parsing. It's a plist, so something
like Mac::PropertyList can handle that for you. The module is designed
to to the hard work for you so you can slap on a nice interface, but
that's not so bad.

I'm also thinking about creating something to provide the
system_profiler output as a Perl hash. You can get that with XML (which
is just another plist), though.
 




 16 Posts in Topic:
Detecting OS X version from perl
david@[EMAIL PROTECTED]   2007-10-14 17:29:25 
Re: Detecting OS X version from perl
emoy@[EMAIL PROTECTED] (  2007-10-14 10:45:30 
Re: Detecting OS X version from perl
david@[EMAIL PROTECTED]   2007-10-14 23:56:52 
Re: Detecting OS X version from perl
cdevers@[EMAIL PROTECTED]  2007-10-14 21:37:11 
Re: Detecting OS X version from perl
JD@[EMAIL PROTECTED] (Jo  2007-10-14 19:25:12 
Re: Detecting OS X version from perl
pudge@[EMAIL PROTECTED]   2007-10-15 17:52:04 
Re: Detecting OS X version from perl
nospam@[EMAIL PROTECTED]   2007-11-17 13:21:45 
Re: Detecting OS X version from perl
mbarto@[EMAIL PROTECTED]   2007-11-17 16:37:06 
Re: Detecting OS X version from perl
lprall@[EMAIL PROTECTED]   2007-11-17 21:36:41 
Re: Detecting OS X version from perl
cdevers@[EMAIL PROTECTED]  2007-11-17 21:46:17 
Re: Detecting OS X version from perl
kurtzlepirate@[EMAIL PROT  2007-11-18 10:49:22 
Re: Detecting OS X version from perl
mbarto@[EMAIL PROTECTED]   2007-11-18 17:40:51 
Re: Detecting OS X version from perl
brian.d.foy@[EMAIL PROTEC  2007-11-19 20:22:32 
Re: Detecting OS X version from perl
peter@[EMAIL PROTECTED]   2007-11-18 17:02:02 
Re: Detecting OS X version from perl
brian.d.foy@[EMAIL PROTEC  2007-11-18 21:22:04 
Re: Detecting OS X version from perl
cdevers@[EMAIL PROTECTED]  2007-11-20 22:21:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 0:43:53 CST 2008.