Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2009 19:35:38 -0800
From:      Chris Cowart <ccowart@rescomp.berkeley.edu>
To:        Gary Kline <kline@thought.org>
Cc:        FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG>
Subject:   Re: need a newline between paragraphs....
Message-ID:  <20091124033538.GK11723@hal.rescomp.berkeley.edu>
In-Reply-To: <20091124013934.GA51279@thought.org>
References:  <20091124002920.GA51110@thought.org> <20091124003652.GH11723@hal.rescomp.berkeley.edu> <20091124013934.GA51279@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--hdhkc9EpVJoq6PQ6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Gary Kline wrote:
> 	PS: is there any one-liner to add back one newline between
> 	paragraphs?

That depends a lot on how you define paragraph. If they all start with
tabs, something like:

sed '/^<^VTAB>/ i\
\<^VTAB>
' myfile

Where you use ^VTAB to insert some literals tabs on the commandline. I
couldn't seem to convince sed to insert an empty line, but I didn't play
around with it all that long.

If you need more sophisticated paragraph detection (like based on the
previous line not being some number of characters or some kind of period
to capital letter thing or something), you're going to spend a lot more
time mucking through it.

--=20
Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley

--hdhkc9EpVJoq6PQ6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)

iQIcBAEBAwAGBQJLC1SKAAoJEC8b9sM8ejXtlZcP/2Qw/5TpST+ZdDSU1Y9LcDza
NCzpAvTtboNUVq1bmRbEFQi0G+TFLh+a39WIRMk20aiYFWpeMmEUkAW6OCzGnna5
fPheb/x8VgOFIjYn4Z0aRJPMAhc7ze2E+MvU8oLXzl6U3jlq5qoZQrwHga5L1v6d
17+ARBT0DO0dC4CeUfQTpMO+bnC75vRoODDIh97EqMPSqZ6Fxjf7HngNPzZGrDOo
4uHe/3qrN8j8NGtm0vvu6r3glqE1rqobEcG6KiVKQy6cUZVWgKhydqTAOUV4UD9U
iG0iLm01RBTPJ52/ycHO2lBcGbFO3Dr4O5FvjPCxviJ8QQ588TduY4VJFwyqY6cj
AEPGmYI7hTc3eo8qcxrwrvw7wSU/NuRVEI6iwXtF5mz/FGkKQ+xt/7En8HWHzk41
kMVe3+uEbJ/Naj8YbKbz5j+XzMhuca/umdUwmc/m0AXDv5zx6CA/2WkbzuIou4g3
JWunK8vCWO3iaZ6UUN8RKc67lPDI3YYl6lZXsvQNsAfZi7+7LUydLvH9ioDyVNWK
AO9DhkKtR6QAryTWOB/2t6X9SBpNcw32mEtQK+jrk+xgdoXJ0Berq5MRz3+H+a8+
+bgCuE9m+R80PtD2n1iUTDEaki3DNBExGONFljNo/ntYdiXUdXOHjRNltBvAeQcy
316f6MWBGIWfOunqTcxZ
=eE/m
-----END PGP SIGNATURE-----

--hdhkc9EpVJoq6PQ6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091124033538.GK11723>