Date: Fri, 20 Jun 2003 17:01:40 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Warren Block <wblock@wonkity.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: IPFW Log question Message-ID: <20030620160140.GC2304@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20030620094405.P12980@wonkity.com> References: <20030620130049.63710.qmail@web10002.mail.yahoo.com> <20030620134326.GA615@happy-idiot-talk.infracaninophile.co.uk> <20030620081951.G12793@wonkity.com> <20030620153457.GA2304@happy-idiot-talk.infracaninophile.co.uk> <20030620094405.P12980@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Fri, Jun 20, 2003 at 09:49:28AM -0600, Warren Block wrote:
> On Fri, 20 Jun 2003, Matthew Seaman wrote:
> Ah, I didn't see that you were expanding those lines. You're right
> about the useless backreference. And then right after posting, I
> realized that it could be even smaller and--arguably--clearer:
>
> #!/usr/bin/perl -w
>
> while (<>) {
> print unless /last message repeated \d+ times/;
> }
Even smaller:
#!/usr/bin/perl -wn
print unless /last message repeated \d+ times/;
But this perl is all just a resource consuming way of saying:
% grep -vE 'last message repeated [0-9]+ times'
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)
iD8DBQE+8y/kdtESqEQa7a0RAiKJAJwN956Fx7nh4Vo/0etvhCwmNWGkuACeI+2e
yoD0MjUJkL0wcj58Mw02XyI=
=AEW2
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030620160140.GC2304>
