In a message dated Tue, 25 Feb 2003, drieux writes: > > On Tuesday, Feb 25, 2003, at 18:20 US/Pacific, Chris Devers wrote: > [..] > > > > And, now that I try it, it also looks inaccurate: > > > > % sw_vers | grep 'ProductVersion' | awk '{print $2}' > > 10.2.4 > > % > [..] > > hence for moral purity we would do: > > sub get_osx_version > ...
Or, for a one-liner that's still morally pure: % sw_vers | perl -anle 'print $F[1] if /ProductVersion:/' Trey -- who thinks this dead horse has now been beaten to a pulp