|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#10019: closed (sort options -Mn are incompatible) |
Date: | Fri, 11 Nov 2011 18:54:02 +0000 |
Your message dated Fri, 11 Nov 2011 17:55:33 +0000 with message-id <address@hidden> and subject line Re: bug#10019: sort options -Mn are incompatible has caused the debbugs.gnu.org bug report #10019, regarding sort options -Mn are incompatible to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 10019: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10019 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: sort options -Mn are incompatible Date: Fri, 11 Nov 2011 15:55:48 +0200 Since the sort options -M and -n are incompatible, there appears to be no easy way to sort log files. User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 /Lars
--- End Message ---
--- Begin Message ---Subject: Re: bug#10019: sort options -Mn are incompatible Date: Fri, 11 Nov 2011 17:55:33 +0000 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 tag 10019 notabug On 11/11/2011 01:55 PM, Lars Noodén wrote: > Since the sort options -M and -n are incompatible, there appears to be no > easy way to sort log files. Here is a recipe I use for sorting access_log files, which avoids numeric conversion as they're fixed width fields. sort -b -k4.9,4.12 -k4.5b,4.7Mb -k4.2,4.3 -k4.14,4 access_log Though one could use -M and -n on separate fields like `-k1,1M -k2,2n` Note also the --debug option on recent versions of sort which helps one figure this out, including subtleties like needing the b after the M even though a global -b was specified. cheers, Pádraig.
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |