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 require one newline
character in the substitution part as a result:

    perl -pie 's/$/\n/' filename.txt

Plus . . . I like pie.

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

Attachment: pgpGpP9Q2VWV4.pgp
Description: PGP signature

Reply via email to