title: Modifying a list of files based on the filename extension
body: <p>I have a .txt file with below entries</p>
  <pre><code>filename.type1
  filename.type1
  filename.type2
  filename.type3
  filename.type3
  filename.type4
  filename.type5
  </code></pre>
  <p>For any and all entries of .type1 and .type2, it shall delete and then add respective entry in .txt file as filename_important.type1, or .type2.</p>
  <p>Modified file shall look like:</p>
  <pre><code>filename_important.type1
  filename_important.type1
  filename_important.type2
  filename.type3
  filename.type3
  filename.type4
  filename.type5
  </code></pre>