title: Using grep and xargs, avoiding 'unterminated quote' error
body: <p>I'm getting frustrated enough that I figured it was time to ask a question.</p>
  
  <p>I'm trying to replace an email address across a website that is hard coded into 1000's of pages.  It's on a FreeBSD 6.3 server.</p>
  
  <p>Here is the command I am using:</p>
  
  <p>grep -R --files-with-matches 'Email\@domain.com' . | sort | uniq | xargs perl -pi -e 's/Email\@domain.com/Email\@newdomain.com/' *.html</p>
  
  <p>And here is the error that I keep getting:</p>
  
  <p>xargs: unterminated quote</p>
  
  <p>Oddly enough, when I run that command on a test case of 3 files (in a nested structure) it works just fine.  I've been googling and most solutions seem to deal with adding a -print0 after the . and a -0 after the xargs.  However, this yields a different set of errors that lead me to believe I'm putting things in the wrong places.</p>
  
  <p>thanks in advance for your help</p>