[svlug] edit a 1GB file

Will Lowe harpo at thebackrow.net
Sun Mar 30 23:11:43 PST 2003

> > 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.


More information about the svlug mailing list