need a newline between paragraphs....

Chris Cowart ccowart at
Tue Nov 24 03:35:39 UTC 2009

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\
' 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.

Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list