Re: okay, time to ask the wizards.

2010-10-28 Thread Chip Camden
Quoth Devin Teske on Thursday, 28 October 2010: > On Thu, 2010-10-28 at 09:31 -0700, Gary Kline wrote: > > On Thu, Oct 28, 2010 at 08:18:06AM -0500, Robert Bonomi wrote: > > > > > > > From: Gary Kline > > > > To: FreeBSD Mailing List > > > &g

Re: okay, time to ask the wizards.

2010-10-28 Thread Devin Teske
On Thu, 2010-10-28 at 09:31 -0700, Gary Kline wrote: > On Thu, Oct 28, 2010 at 08:18:06AM -0500, Robert Bonomi wrote: > > > > > From: Gary Kline > > > To: FreeBSD Mailing List > > > Cc: > > > Subject: okay, time to ask the wizards. > >

Re: okay, time to ask the wizards.

2010-10-28 Thread Gary Kline
On Thu, Oct 28, 2010 at 08:18:06AM -0500, Robert Bonomi wrote: > > > From: Gary Kline > > To: FreeBSD Mailing List > > Cc: > > Subject: okay, time to ask the wizards. > > > > I've got a very large file with paragraphs separated only by "\n&quo

Re: okay, time to ask the wizards.

2010-10-28 Thread Gary Kline
On Thu, Oct 28, 2010 at 03:18:02PM +1030, Wayne Sierke wrote: > On Wed, 2010-10-27 at 18:16 -0700, Liontaur wrote: > > On Wed, Oct 27, 2010 at 6:04 PM, Gary Kline wrote: > > > > > I've got a very large file with paragraphs separated only by "\n". > > > How do I put a blank line _after_ each newli

Re: okay, time to ask the wizards.

2010-10-28 Thread Wayne Sierke
On Thu, 2010-10-28 at 15:18 +1030, Wayne Sierke wrote: > > On Wed, Oct 27, 2010 at 6:04 PM, Gary Kline wrote: > > > > > I've got a very large file with paragraphs separated only by "\n". > > > How do I put a blank line _after_ each newline? > In this particular case however, sed does offer the "

Re: okay, time to ask the wizards.

2010-10-28 Thread Robert Bonomi
> From: Gary Kline > To: FreeBSD Mailing List > Cc: > Subject: okay, time to ask the wizards. > > I've got a very large file with paragraphs separated only by "\n". > How do I put a blank line _after_ each newline? have you tried something as simple

Re: okay, time to ask the wizards..

2010-10-28 Thread perryh
Chad Perrin wrote: > Plus . . . I like pie. A bit out of season, aren't we? It's nowhere near 1 minute before 2 on March 14. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, sen

Re: okay, time to ask the wizards.

2010-10-27 Thread Gary Kline
On Wed, Oct 27, 2010 at 07:29:25PM -0600, Chad Perrin wrote: > On Wed, Oct 27, 2010 at 06:14:04PM -0700, Nerius Landys wrote: > > You mean replace each newline character with two newline characters? > > > > perl -p -i -e 's/\n/\n\n/g' yourfile.txt > Hm. Didn't think of perl; but yeah.

Re: okay, time to ask the wizards.

2010-10-27 Thread Gary Kline
On Wed, Oct 27, 2010 at 07:10:55PM -0600, Chad Perrin wrote: > On Wed, Oct 27, 2010 at 06:04:50PM -0700, Gary Kline wrote: > > I've got a very large file with paragraphs separated only by "\n". > > How do I put a blank line _after_ each newline? > > perl -e 'while (<>) { s/$/\n/; print; }' >

Re: okay, time to ask the wizards.

2010-10-27 Thread Wayne Sierke
On Wed, 2010-10-27 at 18:16 -0700, Liontaur wrote: > On Wed, Oct 27, 2010 at 6:04 PM, Gary Kline wrote: > > > I've got a very large file with paragraphs separated only by "\n". > > How do I put a blank line _after_ each newline? > > > > > Perhaps using sed? i'm definitely no sed expert but the su

Re: okay, time to ask the wizards.

2010-10-27 Thread Chad Perrin
On Wed, Oct 27, 2010 at 06:14:04PM -0700, Nerius Landys wrote: > You mean replace each newline character with two newline characters? > > perl -p -i -e 's/\n/\n\n/g' yourfile.txt The g in that is unnecessary. I'd also be inclined to use $ in the matching part of that regex than \n, and only requ

Re: okay, time to ask the wizards.

2010-10-27 Thread Chad Perrin
On Wed, Oct 27, 2010 at 06:04:50PM -0700, Gary Kline wrote: > I've got a very large file with paragraphs separated only by "\n". > How do I put a blank line _after_ each newline? perl -e 'while (<>) { s/$/\n/; print; }' You could also open the file in vi or Vim and give it this command:

Re: okay, time to ask the wizards.

2010-10-27 Thread Liontaur
On Wed, Oct 27, 2010 at 6:04 PM, Gary Kline wrote: > I've got a very large file with paragraphs separated only by "\n". > How do I put a blank line _after_ each newline? > > Perhaps using sed? i'm definitely no sed expert but the substitute command would work, just substitute one \n with two? Ma

Re: okay, time to ask the wizards.

2010-10-27 Thread Nerius Landys
You mean replace each newline character with two newline characters? perl -p -i -e 's/\n/\n\n/g' yourfile.txt Something like that? On Wed, Oct 27, 2010 at 6:04 PM, Gary Kline wrote: > I've got a very large file with paragraphs separated only by "\n". > How do I put a blank line _after_ each ne

okay, time to ask the wizards.

2010-10-27 Thread Gary Kline
I've got a very large file with paragraphs separated only by "\n". How do I put a blank line _after_ each newline? -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.90a release of Jottings: http://jottings.thought.org/index.php h