Howto use find and sed to make a replace in multiple files

With the sed command and find command you can replace all instances of a word or multiple words in multiple files

find. -name "*.c" -exec sed -i "s/oldWord/newWord/g" '{}' \;
 * Examples
 * To replace "oldWord" with "newWord" in all the files *.c :

counter=0;for f in `cat replace.txt`;do replace[counter]=$f;counter=$counter+1;done;counter2=0; for ((a=0; a <= $counter-1; a=a+2)); do `sed -i "s/${replace[$a]}/${replace[$a+1]}/g" *.c` ;done;
 * To replace multiple words in files :
 * Edit a temporary file "replace.txt"
 * Add the words you want to replace on a column
 * Add the replacement words in the second column
 * For example
 * word1 replacement1
 * word2 replacement2
 * To do the task, replace all the words from the first column with the equivalent from the second column in all the files *.c, Execute :

From HowTo Wiki, a Wikia wiki.