title: How can I avoid "no input files" error from sed, when run from xargs?
body: <p>I have this shell script to update IP addresses in my configuration files (any that match <code>$old_address_pattern</code> must be changed to <code>$new_address</code>):</p>
  
  <pre class="lang-sh prettyprint-override"><code>grep -rl "$old_address_pattern" /etc \
    | xargs sed -i "s/$old_address_pattern/$new_address/g"
  </code></pre>
  
  <p>If the <code>grep</code> command finds no matching files, then <code>sed</code> will complain 'no input files'.  How can I make this pipeline succeed when the list of files is empty?</p>