From owner-freebsd-questions@FreeBSD.ORG Fri Jun 20 09:01:52 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4B0637B401 for ; Fri, 20 Jun 2003 09:01:52 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09CF143F3F for ; Fri, 20 Jun 2003 09:01:51 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h5KG1eo2002824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Jun 2003 17:01:44 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h5KG1e8u002823; Fri, 20 Jun 2003 17:01:40 +0100 (BST) (envelope-from matthew) Date: Fri, 20 Jun 2003 17:01:40 +0100 From: Matthew Seaman To: Warren Block Message-ID: <20030620160140.GC2304@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Warren Block , Ronnie Clark , FreeBSD Questions 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XvKFcGCOAo53UbWW" Content-Disposition: inline In-Reply-To: <20030620094405.P12980@wonkity.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-11.2 required=5.0 tests=AWL,BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MUTT autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: Ronnie Clark cc: FreeBSD Questions Subject: Re: IPFW Log question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2003 16:01:53 -0000 --XvKFcGCOAo53UbWW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2003 at 09:49:28AM -0600, Warren Block wrote: > On Fri, 20 Jun 2003, Matthew Seaman wrote: =20 > 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: >=20 > #!/usr/bin/perl -w >=20 > 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 --=20 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 --XvKFcGCOAo53UbWW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE+8y/kdtESqEQa7a0RAiKJAJwN956Fx7nh4Vo/0etvhCwmNWGkuACeI+2e yoD0MjUJkL0wcj58Mw02XyI= =AEW2 -----END PGP SIGNATURE----- --XvKFcGCOAo53UbWW--