NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/51457 (Incorrect postinstall version-number sort options)
The following reply was made to PR toolchain/51457; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: toolchain/51457 (Incorrect postinstall version-number sort options)
Date: Sat, 03 Sep 2016 03:32:30 +0700
Date: Fri, 2 Sep 2016 14:55:01 +0000 (UTC)
From: Michael Plass <mfpnb%plass-family.net@localhost>
Message-ID: <20160902145501.793C27A286%mollari.NetBSD.org@localhost>
| This is (I think) because posix says that "If any modifier is attached to a
| field_start or to a field_end, no option shall apply to either."
I actually wondered about that when I made the change, but wasn't sure if
any implementations actually acted that way.
| So to use modifiers, it needs to be
| sort -t. -k1,1nr -k2,2nr -k3,3nr
I started to do it that way, but ...
| but is there a reason not to use
| sort -t. -nr -k1,1 -k2,2 -k3,3
| ?
Not really I guess, so I changed it to that (before I even got this far
into reading your message...) I have a slight preference towards not
using global opts unless they are (and can rationally) be applied to the
whole record (so global -r makes sense, as here the reverse sort is wanted
however the sort gets done - I'd use the r tak on a field selector if just
that field was to be sorted in descending order) but the records themselves
are not numeric, just the fields, so global -n just seems "wrong" ... but
the posix rules make that combination fail, so ...
OK now?
kre
Home |
Main Index |
Thread Index |
Old Index