sed is a text processing thingy that is very sophisticated.
sed
Here is a useful stackexchange thread that shows how to use sed to perform a “search an replace” across groups of files.