title: sed: Why does a file being edited in-place have modified lines doubled?
body: <p>The perils of working tired:</p>
  
  <pre><code>sed -i 's/foo/barbazqux/p' example.txt
  </code></pre>
  
  <p>This made the output file have two copies of any modified line.</p>