Re: need a newline between paragraphs....

2009-11-25 Thread Gary Kline
On Wed, Nov 25, 2009 at 01:08:39PM -0700, Chad Perrin wrote: > On Tue, Nov 24, 2009 at 01:19:42PM -0800, Gary Kline wrote: > > On Tue, Nov 24, 2009 at 01:07:41PM -0700, Chad Perrin wrote: > > > > precisely. in this case, every paragraph that is not on a > > newline wraps. so anything tha

Re: need a newline between paragraphs....

2009-11-25 Thread Chad Perrin
On Tue, Nov 24, 2009 at 01:19:42PM -0800, Gary Kline wrote: > On Tue, Nov 24, 2009 at 01:07:41PM -0700, Chad Perrin wrote: > > precisely. in this case, every paragraph that is not on a > newline wraps. so anything that has an EOL is a new > paragraph. If I understand you corre

Re: need a newline between paragraphs....

2009-11-24 Thread Gary Kline
On Tue, Nov 24, 2009 at 01:07:41PM -0700, Chad Perrin wrote: > On Mon, Nov 23, 2009 at 05:39:35PM -0800, Gary Kline wrote: > > > > 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 f

Re: need a newline between paragraphs....

2009-11-24 Thread Gary Kline
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*

Re: need a newline between paragraphs....

2009-11-24 Thread Chad Perrin
On Mon, Nov 23, 2009 at 05:39:35PM -0800, Gary Kline wrote: > > 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

Re: need a newline between paragraphs....

2009-11-24 Thread Giorgos Keramidas
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

Re: need a newline between paragraphs....

2009-11-23 Thread Chris Cowart
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 comma

Re: need a newline between paragraphs....

2009-11-23 Thread Gary Kline
On Mon, Nov 23, 2009 at 04:36:52PM -0800, Chris Cowart wrote: > Gary Kline wrote: > > some several weeks ago, i got the appended perl code sent that > > takes a very long txt file and diving by ``Chapter NN'' puts > > the long file into seperate files, 01 to 66. trouble is that > >

Re: need a newline between paragraphs....

2009-11-23 Thread Chris Cowart
Gary Kline wrote: > some several weeks ago, i got the appended perl code sent that > takes a very long txt file and diving by ``Chapter NN'' puts > the long file into seperate files, 01 to 66. trouble is that > it is hard to read by eyes without a space between paragraphs.

need a newline between paragraphs....

2009-11-23 Thread Gary Kline
some several weeks ago, i got the appended perl code sent that takes a very long txt file and diving by ``Chapter NN'' puts the long file into seperate files, 01 to 66. trouble is that it is hard to read by eyes without a space between paragraphs. it's eas