[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Is awk the right tool for this?
- Subject: [ale] Is awk the right tool for this?
- From: jknapka at earthlink.net (Joseph A Knapka)
- Date: Tue, 07 May 2002 09:52:08 -0600
Fletch wrote:
>
> perl -lne \
> '/SRC=(\S+)/&&$a{$1}++;END{print for sort{$a{$b}<=>$a{$a}}keys%a}' \
> /var/log/kernel/info
>
> In numeric order by IP address:
>
> perl -MSocket=inet_aton -lne \
> '/SRC=(\S+)/&&$a{$1}++;END{print for map{$_->[0]}sort{$a->[1]<=>$b->[1]}map{[$_,inet_aton($_)]}keys%a}' \
> /var/log/kernel/info
Wow. That's really nauseating.
:-)
Cheers,
-- Joe
Any OS distinguishable from Windows is not sufficiently broken.
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.