[svlug] Re: edit a 1GB file

David Hummel ddhummel at pacbell.net
Mon Mar 31 12:36:19 PST 2003


On Mon, Mar 31, 2003 at 04:30:58AM -0800, Rufoo wrote:
> --- Will Lowe <harpo at thebackrow.net> wrote:
> > perl -pi -e 's/^some line$/some other line/g'
> 
> Why even perl when sed can do the same. 

Because Perl's regex engine and syntax is more flexible and powerful
than sed's (especially for one liners involving tabs and soforth).  It
depends on the transformation you are after.  For most edits, sed is
sufficient, and very efficient.

David Hummel
Genomics & Gene Discovery
WRRC/ARS/USDA



More information about the svlug mailing list