[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10019: sort options -Mn are incompatible

From: Eric Blake
Subject: bug#10019: sort options -Mn are incompatible
Date: Fri, 11 Nov 2011 10:34:42 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

tag 10019 moreinfo

On 11/11/2011 06:55 AM, Lars Noodén wrote:
> Since the sort options -M and -n are incompatible, there appears to be
> no easy way to sort log files.

Not true, if you use -k to separate the sort into non-overlapping keys.
 Please post an example of 2 or 3 lines you'd like sorted, and then we
can help you figure out the correct command line.  For example,

sort -k1,1M -k2,2nb

would sort lines where the first field is a month name and the second
field is a day within the month, with all ties being broken by comparing
the overall line.

I'm guessing that there is no bug in sort, but I'll wait for more info
from you of an actual sample of the lines you want sorted, what you
tried, what you got, and a comparison to what you wanted, before
declaring this as not a bug.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]