title: how to use xargs with sed in search pattern
body: <p>I need to use the output of a command as a search pattern in sed. I will make an example using echo, but assume that can be a more complicated command:</p>
  
  <pre><code>echo "some pattern" | xargs sed -i 's/{}/replacement/g' file.txt
  </code></pre>
  
  <p>That command doesn't work because "some pattern" has a whitespace, but I think that clearly illustrate my problem.</p>
  
  <p>How can I make that command work?</p>
  
  <p>Thanks in advance,</p>