grep -rl originalBy default sed and vi will only replace the first instance of a string on a line. The /g will ensure that all instances of./* | xargs sed -i 's/original /replacement /g'
Wednesday, November 18, 2009
Recursively Search & Replace with grep and sed
The following tidbit recursively searches the current directory for files containing a string, and replaces the string, in place, with a new string,.
on every line is replaced.