Re: Detecting OS X version from perl

2007-11-19 Thread brian d foy
In article [EMAIL PROTECTED], Michael Barto [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

Re: Detecting OS X version from perl

2007-11-18 Thread kurtz le pirate
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Chris Devers) wrote: Quick report: $ system_profiler -detailLevel mini Obsessive detail report: $ system_profiler -detailLevel full a little more precise if use system_profiler : system_profiler SPSoftwareDataType|grep

Re: Detecting OS X version from perl

2007-11-18 Thread Peter N Lewis
At 17:52 -0700 15/10/07, Chris Nandor wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (David Cantrell) wrote: ie whether it's 10.0, 10.1 etc, I don't care about the difference between 10.3.3 and 10.3.4. This is nice in that it doesn't depend on external processes (sw_vers, Finder)

Re: Detecting OS X version from perl

2007-11-18 Thread Michael Barto
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 On Solaris you have pkginfo, in HP you have "swlist" and Linux you need to use

Re: Detecting OS X version from perl

2007-11-17 Thread Eberhard Lisse
Very Cool, on my iMini Gestalt says it's 10.4.9 osascript/fider says 10.4.7 sw_version 10.4.11 the latter is correct :-)-O on 10/16/07 2:52 AM Chris Nandor said the following: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (David Cantrell) wrote: Is there any simple way that people can

Re: Detecting OS X version from perl

2007-11-17 Thread Peter Hartmann
On my 800Mhz Dual Processor PPC the AS command system info returns the correct version (10.4.11). Am 17.11.2007 um 12:21 schrieb Eberhard Lisse: Very Cool, on my iMini Gestalt says it's 10.4.9 osascript/fider says 10.4.7 I guess this is the version for the application Finder, not the OS!

Re: Detecting OS X version from perl

2007-11-17 Thread Michael Barto
Just a quick question. Is there a command line at a terminal window of MacOSX that can do this- tell you more about the hardware? Also list software packages and their revisions and also patches? Peter Hartmann wrote: On my 800Mhz Dual Processor PPC the AS command system info

Re: Detecting OS X version from perl

2007-11-17 Thread Larry Prall
Try 'system_profiler'. Running it as 'system_profiler -detaillevel full' will probably provide more information than you really need. Run it with an unrecognized option (e.g. '-help') for more info. On Nov 17, 2007, at 7:37 PM, Michael Barto wrote: Just a quick question. Is there a

Re: Detecting OS X version from perl

2007-11-17 Thread Chris Devers
On Nov 17, 2007, at 7:37 PM, Michael Barto wrote: Just a quick question. Is there a command line at a terminal window of MacOSX that can do this- tell you more about the hardware? Quick report: $ system_profiler -detailLevel mini Obsessive detail report: $ system_profiler

Re: Detecting OS X version from perl

2007-10-15 Thread Chris Nandor
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (David Cantrell) wrote: Is there any simple way that people can think of to detect which major version of OS X my perl code is running on? ie whether it's 10.0, 10.1 etc, I don't care about the difference between 10.3.3 and 10.3.4. This is

Detecting OS X version from perl

2007-10-14 Thread David Cantrell
Is there any simple way that people can think of to detect which major version of OS X my perl code is running on? ie whether it's 10.0, 10.1 etc, I don't care about the difference between 10.3.3 and 10.3.4. -- David Cantrell | Hero of the Information Age I caught myself pulling grey hairs

Re: Detecting OS X version from perl

2007-10-14 Thread Edward Moy
% perl -e 'chomp($vers = `sw_vers -productVersion`); print $vers\n' That will get you either 10.x or 10.x.y. You just need to strip off the .y if it is there. Ed On Oct 14, 2007, at 9:29 AM, David Cantrell wrote: Is there any simple way that people can think of to detect which major

Re: Detecting OS X version from perl

2007-10-14 Thread John Delacour
At 17:29 +0100 14/10/07, David Cantrell wrote: Is there any simple way that people can think of to detect which major version of OS X my perl code is running on? ie whether it's 10.0, 10.1 etc, I don't care about the difference between 10.3.3 and 10.3.4. print `osascript -e 'tell app Finder

Re: Detecting OS X version from perl

2007-10-14 Thread David Cantrell
On Sun, Oct 14, 2007 at 10:45:30AM -0700, Edward Moy wrote: % perl -e 'chomp($vers = `sw_vers -productVersion`); print $vers\n' That will get you either 10.x or 10.x.y. You just need to strip off the .y if it is there. Perfect, thanks! -- David Cantrell | Nth greatest programmer in the

Re: Detecting OS X version from perl

2007-10-14 Thread Chris Devers
On Oct 14, 2007, at 6:56 PM, David Cantrell [EMAIL PROTECTED] wrote: On Sun, Oct 14, 2007 at 10:45:30AM -0700, Edward Moy wrote: % perl -e 'chomp($vers = `sw_vers -productVersion`); print $vers\n' That will get you either 10.x or 10.x.y. You just need to strip off the .y if it is there.