grep will do a first find and return the matched file names
xargs will pass each file name with its path to sed
and obviously sed will edit inline and replace the contents
grep -rl “oldword” ./ | xargs sed -i ’s/oldword/newword/’
grep will do a first find and return the matched file names
xargs will pass each file name with its path to sed
and obviously sed will edit inline and replace the contents
grep -rl “oldword” ./ | xargs sed -i ’s/oldword/newword/’