So I have a file, with a bunch of pattern "foo", and I wanna replace them with "bar":
Code:
blah1 foo1 blah2 blah3 foo2 blah4foo3
We all know all the pattern can be replaced by `sed` command, the catch is, you need to create a "temp" file to hold the output.
I wouldnt bother if the file size is just a couple of Kb, but, what if its a few hundred of Mb, Im restricted in disk space, then you are in trouble.
I think vim can do this with "-c" switch if iirc, but I believe there is a more elegant command out there...