Two shell scripts that you should immediately arm yourself with are
described here. Both use a shell for
loop (Section 35.21) to apply the
same edits to any number of files. But the first just shows the
changes, so you can make sure that your edits were made correctly.
The second writes the edits back into the original file, making them
permanent.