|
From: | Matthew Woehlke |
Subject: | Re: RFC: add'l 'sort -n' options |
Date: | Mon, 06 Nov 2006 15:04:33 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0 |
Paul Eggert wrote:
Matthew Woehlke writes:Paul Eggert wrote:Matthew Woehlke writes:Paul Eggert wrote:Matthew Woehlke writes:'-N _options_, --numeric-sort=_options_'The other sort options can be attached to -k; how would this work here?Sorry, I'm not sure I understand what you mean by this comment. What would be attached to -k, and how?For example, "sort -k2,2n -k3,3g" says sort numerically in column 2, breaking ties with a general numeric sort in column 3.Ok, but how would I sort these? 2006-11-06 13:20:15 2006-11-05 12:18:04 2006-11-06 13:20:37 2005-04-01 01:01:01 ...see where the number of args to '-k' quickly gets out of hand?Sure, but my point was not that the new options can be implemented with -k. It is that there needs to be some way to attach the new options to particular keys. That is, one would like to sort with your new -Nr option just on these two keys, and then sort with some other options on other keys.
Ok, I get it... sorry for the confusion. IOW it needs to be recognized both on its own and by -k. Now that I understand what you're saying, I am in total agreement. :-)
Since it seems we've mostly shot down the -N idea in favor of explicit options (which is fine!), the mechanics from the user's perspective should be straight-forward. As mentioned previously, I think we went from '-N <lots of stuff>' to '-r', '-h' (maybe do block size only via long-opt '-h'), and '-b/-B' (not sure which I prefer case-wise). Additionally, although all of these affect numeric sort (the reason for '-N' in the first place), they are all orthogonal to each other :-).
This brings up another question I should probably ask; are digits > 9 case-sensitive?I don't see why they would be. I suppose you could add an option to let the user specify the spelling of the digits, but perhaps this is overkill.
Agreed, at least until someone asks for it. :-) Like I said, I'm just gathering information at this stage so I don't do wrong/extra work when I start thinking about code.
Thanks again for the feedback! -- MatthewIf this message is intercepted, the sender will disavow all knowledge of its existence.
[Prev in Thread] | Current Thread | [Next in Thread] |