From owner-freebsd-questions@FreeBSD.ORG Tue Nov 24 21:09:18 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 356F41065672 for ; Tue, 24 Nov 2009 21:09:18 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (ns1.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id E548B8FC13 for ; Tue, 24 Nov 2009 21:09:17 +0000 (UTC) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id nAOL8ppB020197; Tue, 24 Nov 2009 13:08:51 -0800 (PST) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Tue, 24 Nov 2009 13:09:10 -0800 (PST) Date: Tue, 24 Nov 2009 13:09:10 -0800 From: Gary Kline To: Giorgos Keramidas Message-ID: <20091124210909.GE54631@thought.org> References: <20091124002920.GA51110@thought.org> <20091124003652.GH11723@hal.rescomp.berkeley.edu> <20091124013934.GA51279@thought.org> <87638zn92p.fsf@kobe.laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87638zn92p.fsf@kobe.laptop> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 23 years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org Cc: FreeBSD Mailing List , Chris Cowart Subject: Re: need a newline between paragraphs.... 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, 24 Nov 2009 21:09:18 -0000 On Tue, Nov 24, 2009 at 07:09:34PM +0200, Giorgos Keramidas wrote: > On Mon, 23 Nov 2009 17:39:35 -0800, Gary Kline wrote: > > PS: is there any one-liner to add back one newline between paragraphs? > > Not an accurate one. > > You can *guess* when a line ends with a punctuation character > *and* it is shorter than some configurable wrapping column that > it is probably the end of a paragraph. But this is only a > heuristic guess and a pretty silly heuristic at that. > it's prob'ly bcse i'm older than zeus, but it seems that i once wrote a script or short c program that detected the end-of-paragraph. maybe somewhere in atom. anyway, karl vogel came to my rescue with a two-byte change to the print $fh "$_"; line. appending "$/" resolves the problem. print $fh "$_$/"; now i can point kttsd's reader at the entire [huge] file -- while i read along. or read each chapter individually. the way i wrote them -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.31a release of Jottings: http://jottings.thought.org/index.php