title: using sed to copy lines and delete characters from the duplicates
body: <p>I have a file that looks like this:</p>
  
  <pre><code>@"Afghanistan.png",
  @"Albania.png",
  @"Algeria.png",
  @"American_Samoa.png",
  </code></pre>
  
  <p>I want it to look like this</p>
  
  <pre><code>@"Afghanistan.png",
  @"Afghanistan",
  @"Albania.png",
  @"Albania",
  @"Algeria.png",
  @"Algeria",
  @"American_Samoa.png",
  @"American_Samoa",
  </code></pre>
  
  <p>I thought I could use sed to do this but I can't figure out how to store something in a buffer and then modify it.</p>
  
  <p>Am I even using the right tool?</p>
  
  <p>Thanks</p>