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:

    :%s/$/^M/

Note that you don't type in that ^M by using the ^ and M keys on the
keyboard.  Instead, you first type ctrl-v then press the Enter key.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

Attachment: pgpaTw6st1UGV.pgp
Description: PGP signature

Reply via email to