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 RPM and do " if [ -e /bin/rpm ]; then #rpm based distributions: /bin/rpm -qiav >> ${DATADIR}/${HOST}.programs elif [ -e /usr/bin/apt-cache ]; then #APT (Advanced Packaging Tool) based distributions: for PKG in `apt-cache pkgnames`; do apt-cache show $PKG; done >> ${DATADIR}/${HOST}.programs elif [ -d /var/db/pkg ]; then #Portage software management system based distributions: for PKG in `find /var/db/pkg/ -mindepth 2 -maxdepth 2 -printf "%P\n"`; do echo "Package name: $PKG"; if [ -f /var/db/pkg/$PKG/DESCRIPTION ]; then echo "DESCRIPTION: `cat /var/db/pkg/$PKG/DESCRIPTION`"; else cat /var/db/pkg/$PKG/*ebuild | grep "DESCRIPTION"; fi if [ -f /var/db/pkg/$PKG/HOMEPAGE ]; then echo "HOMEPAGE: `cat /var/db/pkg/$PKG/HOMEPAGE`"; else cat /var/db/pkg/$PKG/*ebuild | grep "HOMEPAGE"; fi if [ -f /var/db/pkg/$PKG/LICENSE ]; then echo "LICENSE: `cat /var/db/pkg/$PKG/LICENSE`"; else cat /var/db/pkg/$PKG/*ebuild | grep "LICENSE"; fi echo; done >> ${DATADIR}/${HOST}.programs else echo "Unable to retrieve package information" >> ${DATADIR}/${HOST}.programs fi " 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" In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Chris Devers) wrote:Quick report: $ system_profiler -detailLevel mini Obsessive detail report: $ system_profiler -detailLevel fulla little more precise if use system_profiler : system_profiler SPSoftwareDataType|grep "System Version" --
|
- Re: Detecting OS X version from perl David Cantrell
- Re: Detecting OS X version from perl Chris Devers
- Re: Detecting OS X version from perl John Delacour
- Re: Detecting OS X version from perl Chris Nandor
- Re: Detecting OS X version from perl Eberhard Lisse
- Re: Detecting OS X version from perl Peter Hartmann
- Re: Detecting OS X version from perl Michael Barto
- Re: Detecting OS X version from perl Larry Prall
- Re: Detecting OS X version from perl Chris Devers
- Re: Detecting OS X version from perl kurtz le pirate
- Re: Detecting OS X version from ... Michael Barto
- Re: Detecting OS X version from ... brian d foy
- Re: Detecting OS X version from ... Chris Devers
- Re: Detecting OS X version from perl Peter N Lewis
- Re: Detecting OS X version from perl brian d foy