From owner-freebsd-questions@FreeBSD.ORG Tue Sep 8 12:17:10 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C51C11065672 for ; Tue, 8 Sep 2009 12:17:10 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9188FC0C for ; Tue, 8 Sep 2009 12:17:10 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1MkzdF-000282-02 for freebsd-questions@freebsd.org; Tue, 08 Sep 2009 14:17:09 +0200 Received: from 78-105-124-69.zone3.bethere.co.uk ([78.105.124.69]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Sep 2009 14:17:08 +0200 Received: from cdr.nil by 78-105-124-69.zone3.bethere.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Sep 2009 14:17:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Mark Willson Date: Tue, 08 Sep 2009 13:17:04 +0100 Lines: 33 Message-ID: References: <20090906003651.GA7388@thought.org> <20090906232300.GA11209@thought.org> <20090907010602.GA11657@thought.org> <20090907230548.GA15330@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 78-105-124-69.zone3.bethere.co.uk User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <20090907230548.GA15330@thought.org> Sender: news Subject: Re: is there a way of usinf greo to find 3 or 4 blank lines? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 12:17:10 -0000 Gary Kline wrote: > On Mon, Sep 07, 2009 at 08:06:51AM +0100, Mark Willson wrote: >> The following version should do what you want: >> >> BEGIN { >> ncnt = 0 >> prev = "BOF" >> } >> /^ *$/ { >> ncnt++; >> if (ncnt > 3) { >> print "Emphasis at " NR ": " prev; >> prev = "-multiple-" >> ncnt = 0; >> } >> next; >> } >> {ncnt = 0; prev = $0} >> >> -mark > > > It does! outstanding.... > > thanks again, > > gary > Gary, No problem. Glad I could help. -mark