coreutils
[Top][All Lists]
Advanced

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

Sort log files solution


From: Ray Phillips
Subject: Sort log files solution
Date: Fri, 30 Sep 2022 12:47:10 +1000

I presume the solution provided on this page:

https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html#sort-invocation

to the "Sort a set of log files, primarily by IPv4 address and
secondarily by timestamp." problem is for an earlier version of sort,
since (unless I'm mistaken) that can now be done using one command:

usort -s -k1,1V -k4.2,4.3n -k4.5,4.7M -k4.9,4.12n -k4.14,4.15n -k4.17,4.18n -
k4.20,4.21

I tried that on Windows 10 with this sort:

C:\> sort --version
sort (GNU coreutils) 8.26
Packaged by Cygwin (8.26-2)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and Paul Eggert.

C:\>


Perhaps that alternative could be added to the web page?



reply via email to

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