title: sed delete not working with cat variable
body: <p>I have a file named test-domain, the contents of which contain the line <em>100.am</em>. </p>
  
  <p>When I do this, the line with 100.am is deleted from the test-domain file, as expected:</p>
  
  <pre><code>for x in $(echo 100.am); do sed -i "/$x/d" test-domain; done
  </code></pre>
  
  <p>However, if instead of <em>echo 100.am</em>, I read each line from a file named unwanted-lines, it does NOT work.</p>
  
  <pre><code>for x in $(cat unwanted-lines); do sed -i "/$x/d" test-domain; done
  </code></pre>
  
  <p>This is even if the only contents of unwanted-lines is one line, with the exact contents <em>100.am</em>.</p>
  
  <p>Does anyone know why sed delete line works if you use <em>echo</em> in your variable, but not if you use <em>cat</em>?</p>