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
{
        open(VER, "sw_vers |") or die "uglie unhappy: $!\n";
        my $ver_num;
        while( <VER> )
        {
                if (/ProductVersion:\s(.*)/)
                {
                        $ver_num = $1
                }
                else
                {
                        next;
                }
        }
        close(VER);

        $ver_num;
}

ciao
drieux

---

It's NOT my Fault,
the Voices in My Head Make me do these things.



Reply via email to