From owner-freebsd-questions@FreeBSD.ORG Tue Nov 24 20:14:23 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 DAAD41065670 for ; Tue, 24 Nov 2009 20:14:23 +0000 (UTC) (envelope-from perrin@apotheon.com) Received: from outbound-mail-21.bluehost.com (outbound-mail-21.bluehost.com [69.89.21.16]) by mx1.freebsd.org (Postfix) with SMTP id A88148FC12 for ; Tue, 24 Nov 2009 20:14:23 +0000 (UTC) Received: (qmail 20542 invoked by uid 0); 24 Nov 2009 20:14:23 -0000 Received: from unknown (HELO box543.bluehost.com) (74.220.219.143) by outboundproxy2.bluehost.com with SMTP; 24 Nov 2009 20:14:23 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=apotheon.com; h=Date:From:To:Subject:Message-ID:Mail-Followup-To:References:Mime-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-Identified-User; b=IWNRw3qmgN3d1+1AP1dU20k6jSbqQ54kF8nWZMjBB2ijNd3s0gxv8PKoRESXvE4ZJ7NjISUAsrqaOE0hNijPoQaN/A+MYkOdGn6LfXgjZGl18T6chdffeVLwn0K90nPR; Received: from c-24-8-180-234.hsd1.co.comcast.net ([24.8.180.234] helo=kukaburra.hydra) by box543.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1ND1mI-00089P-Td for freebsd-questions@FreeBSD.ORG; Tue, 24 Nov 2009 13:14:23 -0700 Received: by kukaburra.hydra (sSMTP sendmail emulation); Tue, 24 Nov 2009 13:07:41 -0700 Date: Tue, 24 Nov 2009 13:07:41 -0700 From: Chad Perrin To: FreeBSD Mailing List Message-ID: <20091124200741.GA1799@guilt.hydra> Mail-Followup-To: FreeBSD Mailing List References: <20091124002920.GA51110@thought.org> <20091124003652.GH11723@hal.rescomp.berkeley.edu> <20091124013934.GA51279@thought.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <20091124013934.GA51279@thought.org> User-Agent: Mutt/1.4.2.3i X-Identified-User: {2737:box543.bluehost.com:apotheon:apotheon.org} {sentby:smtp auth 24.8.180.234 authed with ren@apotheon.org} Cc: 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 20:14:23 -0000 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 23, 2009 at 05:39:35PM -0800, Gary Kline wrote: >=20 > PS: is there any one-liner to add back one newline between > paragraphs? As someone else said -- that depends on how you define a "paragraph" in the file. If any time there's a newline you've got a new paragraph, you can just use a simple substitution regex to replace all instances of one newline with two newlines. If some of your paragraphs are already separated by two newlines, you could just use \n+ in the matching part of your substitution regex to indicate that you want any instance of one or more newlines in succession to be replaced with exactly two newlines -- if that doesn't screw up some other formatting you have in the file. In order to answer this question properly, we'd need to know more about how you define "paragraph" in this context, and whether there are special cases of non-paragraph formatting that might cause conflicts with paragraph formatting while doing a substitution. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --ibTvN161/egqYuK8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEARECAAYFAksMPQ0ACgkQ9mn/Pj01uKWSxACfffqPjE2orcFxEWaZ7NOTVm02 ErUAoNcxpl+fC0EZv/+HlYL5afMopXKC =/H4j -----END PGP SIGNATURE----- --ibTvN161/egqYuK8--