On Sat, Feb 10, 2007 at 10:58:49AM -0800, you wrote:
Don't know what you use sort for Mike but it is critial to server
monitoring tools that parse system logfiles.

If it's so critical, why are you just learning about it now? Anyway, for myself, I keep my logs in ISO date format, which is much easier to parse for this sort of purpose (YYYY-mm-ddTHH:MM:SS) and works without specifying any funky options for sort. If you're stuck with logs in traditional syslog format, try this:

sort -u -k 1,1M -k 2,2n -k 3

Note that the documentation for -M says "month sort"; it says nothing about days, and certainly doesn't say "by_date". You need something like the above to specify how you want each column of data sorted. (Initial column by month, second column numerically, rest in dictionary order.)

Looking at the documentation for sort, it could definately use some examples like the above to show people how the -M option could be used.

I have no interest in "causing the bug to get more attention" and do not appreciate the accusation.

It wasn't an accusation, it was a statement of fact. I was also the only reason I could think of why a problem with a relatively uncommon option to a non-critical text processing utility would be called "important".

Mike Stone


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to