[svlug] edit a 1GB file

Rufoo rufoo2001 at yahoo.com
Mon Mar 31 04:30:58 PST 2003


--- Will Lowe <harpo at thebackrow.net> wrote:
> > > It's a text file and I search for a line
> matching some pattern and
> > > replace it with a different line.  I really only
> do this once in a
> 
> > Use grep(1) to find the line that you want to
> change, use split(1) to
> > cut the files down to a manageable size, use
> vim(1) to edit the data,
> > and then use cat(1) to join everything back to
> together again.
> 
> or perhaps:
> 
> perl -pi -e 's/^some line$/some other line/g'
> 
> "man perlrun" for more.
> 


Why even perl when sed can do the same. 



__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com



More information about the svlug mailing list