Wednesday, July 3, 2013

sed

Use sed to replace some string in a large file (example tested is 2GB in size):

sed -i 's/old_value/new_value/g' filename

Some more examples are there. It seems like in vi using "%s/old_value/new_value/g" is much slower.

No comments:

Blog Archive

Followers