• Re: finding version via command line

    From Paul Sture@paul.sture@bluewin.ch to comp.sys.mac.system on Friday, April 07, 2006 08:49:56
    From Newsgroup: comp.sys.mac.system

    Tom Stiller wrote:
    In article <49lcu4Fp3s1gU1@individual.net>,
    Paul Sture <paul.sture@bluewin.ch> wrote:


    Tom Stiller wrote:

    In article <1144351274.646260.131790@j33g2000cwa.googlegroups.com>,
    "zit" <ttrtilley@gmail.com> wrote:



    sw_vers


    Better than my suggestion.


    Far better! :-) Your suggestion took 20 seconds to spit out the display >>and a total of 35 seconds to complete.

    Here was the ugly display it produced:

    system_profiler | grep -i "system version"
    2006-04-06 22:40:41.534 system_profiler[27421] CFLog (0): >>CFPropertyListCreateFromXMLData(): Old-style plist parser: missing >>semicolon in dictionary.
    2006-04-06 22:40:41.861 system_profiler[27421] CFLog (0): >>CFPropertyListCreateFromXMLData(): The file name for this data might be >>(or it might not): >>/Applications/thunderbird.app/Contents/Resources/English.lproj/InfoPlist.strin
    gs
    System Version: Mac OS X 10.3.9 (7W98)

    Should I be worried about the above errors?

    10.3.9 on a G3 600MHz iBook, upgraded all the way from 10.1.


    Well, I don't get any errors:
    system_profiler | grep -i "system version"
    System Version: Mac OS X 10.4.6 (8I127)

    As it stands it gets _all_ the profile data and discards all but the one line. A much faster command is:
    system_profiler SPSoftwareDataType | grep -i "system version"
    System Version: Mac OS X 10.4.6 (8I127)

    where only the SPSoftwareDataType is selected.


    Far faster, and no errors, thanks.
    --- Synchronet 3.18b-Win32 NewsLink 1.113