Re: okay, time to ask the wizards.

2010-10-28 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; }' You could

Re: okay, time to ask the wizards.

2010-10-28 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. The g

Re: okay, time to ask the wizards..

2010-10-28 Thread perryh
Chad Perrin per...@apotheon.com 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

Re: okay, time to ask the wizards.

2010-10-28 Thread Robert Bonomi
From: Gary Kline kl...@thought.org To: FreeBSD Mailing List freebsd-questions@freebsd.org 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 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 kl...@thought.org wrote: I've got a very large file with paragraphs separated only by \n. How do I put a blank line _after_ each newline? snip In this particular case however, sed does

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 kl...@thought.org wrote: I've got a very large file with paragraphs separated only by \n. How do I put a blank line _after_ each

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 kl...@thought.org To: FreeBSD Mailing List freebsd-questions@freebsd.org 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

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 kl...@thought.org To: FreeBSD Mailing List freebsd-questions@freebsd.org Cc: Subject: okay, time to ask the wizards. I've got a very large

Re: okay, time to ask the wizards.

2010-10-28 Thread Chip Camden
, 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 as sed -e 's/\n//' infile outfile -or- awk '{print; print ;}' infile

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

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 kl...@thought.org wrote: I've got a very large file with paragraphs separated only by \n. How do I put a blank line

Re: okay, time to ask the wizards.

2010-10-27 Thread Liontaur
On Wed, Oct 27, 2010 at 6:04 PM, Gary Kline kl...@thought.org 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

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 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

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 kl...@thought.org 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