Sorting out of sequence log Apache log file

Chris W. Parker cparker at swatgear.com
Wed Apr 26 20:31:40 UTC 2006


Allen K. Smith <mailto:lazlor at bigboy.lotaris.org>
    on Wednesday, April 26, 2006 1:20 PM said:

> sort -t[ -k 2.4,6M -k 2.1,2n -k 2.13,19n
> 
> would catch the timestamps as well (d'oh).

That's better but it's still not quite right because it's sorting by ip
address as well. It should sort by time first and then ip address.



Thanks,
Chris.




More information about the redhat-list mailing list