Re: Detecting OS X version from perl

[email protected] (Chris Devers)
Newsgroups perl.macosx
Message-ID <alpine.OSX.0.999.0711202216190.29504@macgarnicle>
On Sun, 18 Nov 2007, Michael Barto 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

...keeping in mind that that isn't going to work for anything that 
wasn't distributed in a package installer, e.g. nearly everything from 
Microsoft or Adobe, just to pick two piddling example vendors. 

> Seems not a simple solution for MacOSX for system managers who use 
> script to collection information about Unix systems. On the other 
> hand. MacOSX does support "df" and "ifconfig -a"

What do `df` and `ifconfig -a` have to do with software inventory 
cataloging? Does knowing how much disk is available, or what your IP 
address is, get you to knowing what version of Firefox (etc) you have?

Maybe it would be clearer if you said what you *really* need. It looks 
like we're answering what you asked for, rather than what you wanted. 


-- 
Chris Devers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.