title: Running the same sed transformation on a large number of files
body: <p>A bug in some code I wrote resulted in some files being formatted incorrectly. If it were only one file, I could write</p>
  
  <pre><code>cat filename | sed 's/bad/good/g' &gt;filename2
  mv filename2 filename
  </code></pre>
  
  <p>and fix it. I have several hundred files, however, and I would like to make the same transformation on all of them.</p>
  
  <p><strong>Is there some way to apply the same transformation to a large number of files with sed, keeping the filenames the same?</strong></p>
  
  <p><strong>Is sed even the right tool for this job? If not, what should I use?</strong></p>