in reply to Sorting log files with IP addresses (duplicates)
use Socket; print map substr( $_, 4 ), sort map { my ( $src ) = /src\D+([\d.]+)/; my $ip = inet_aton( $src ) || "\0\0\0\0"; "$ip$_"; } @syslog;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting log files with IP addresses (duplicates)
by salva (Canon) on Apr 22, 2006 at 10:52 UTC | |
by jwkrahn (Abbot) on Apr 23, 2006 at 01:40 UTC | |
|
Re^2: Sorting log files with IP addresses (duplicates)
by Secode (Novice) on Apr 24, 2006 at 09:52 UTC |