You can use the SED linux command to search and replace a string within all files inside a directory:
This example replaces all occurrences of fast with slow in file names that end in .htm:
$ find ./* -name ‘*.htm*’ -type f -exec sed -i ‘s/fast/slow/g’ {} \;