From owner-freebsd-questions@FreeBSD.ORG Thu Sep 4 17:32:41 2008 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 1C566106564A for ; Thu, 4 Sep 2008 17:32:41 +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 C86608FC12 for ; Thu, 4 Sep 2008 17:32:40 +0000 (UTC) (envelope-from kline@thought.org) 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 m84HWgUR092956; Thu, 4 Sep 2008 10:32:46 -0700 (PDT) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Thu, 4 Sep 2008 10:32:35 -0700 (PDT) Date: Thu, 4 Sep 2008 10:32:30 -0700 From: Gary Kline To: Karl Vogel Message-ID: <20080904173230.GA33782@thought.org> References: <1219723211.4994.165.camel@localhost> <20080904013330.B1E92B7BD@kev.msw.wpafb.af.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080904013330.B1E92B7BD@kev.msw.wpafb.af.mil> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 22 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-questions@freebsd.org Subject: Re: script to assist ASCII text 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: Thu, 04 Sep 2008 17:32:41 -0000 On Wed, Sep 03, 2008 at 09:33:30PM -0400, Karl Vogel wrote: > >> On Mon, 25 Aug 2008 21:00:10 -0700, > >> Gary Kline said: > > G> This had eluded me for years and it may not be possible, but here goes. > G> I write using vi or, less frequently vim. Is there any sh script that > G> would make sure that there were exactly one space ('\040') between words, > G> and three spaces between sentences? My definition of "a sentence" is a > G> string of words that ends in a period or question-mark, exclamation-mark, > G> or ellipse ("... . || ... ? || ... !) Also, any dash "--" could not have > G> any whitespace around it. > > I like a similar setup -- one space between words, sentences ending > with a period followed by two spaces. The GNU version of "fmt" handles > this pretty well. Here's the first part of your message, formatted to > 50-character-wide lines, with the type of spacing that drives me nuts: > [[ ... ]] > which makes strings like "U.S.A." look like the end of a sentence > even when they're not. This should give you some ideas. > Thanks much. I sure could have used this yersterday!! Esp'ly for getting rid of people who send me GUI mail that's readable-but-messy using Mutt. (******) -gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org