okay, time to ask the wizards.
perrin at apotheon.com
Thu Oct 28 01:34:57 UTC 2010
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 ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20101028/727f5673/attachment.pgp
More information about the freebsd-questions