title: Don't call xargs if the previous command doesn't return anything
body: <p>I have the following command that checks if any new files are added and automatically calls <code>svn add</code> on all these files</p>
  
  <pre><code>svn status | grep -v "^.[ \t]*\..*" | grep "^?" | awk '{print $2}' | xargs svn add
  </code></pre>
  
  <p>But when there are no files, <code>svn add</code> results in a warning. </p>
  
  <p>How to stop from <code>xargs</code> from getting called the previous command doesn't result in any values? The solution needs to work with both GNU and BSD (Mac OS X) versions of <code>xargs</code>.</p>