I am using sed in a script to do a replace and I want to have the replaced file overwrite the file. Normally I think that you would use this:
% sed -i \'s/c
If you don't want to move copies around, you could use ed:
ed file.txt <