title: Piping both stdout and stderr in bash?
body: <p>It seems that newer versions of bash have the <code>&amp;&gt;</code> operator, which (if I understand correctly), redirects both stdout and stderr to a file (<code>&amp;&gt;&gt;</code> appends to the file instead, as Adrian clarified). </p>
  
  <p>What's the simplest way to achieve the same thing, but instead piping to another command?</p>
  
  <p>For example, in this line:</p>
  
  <pre><code>cmd-doesnt-respect-difference-between-stdout-and-stderr | grep -i SomeError
  </code></pre>
  
  <p>I'd like the grep to match on content both in stdout and stderr (effectively, have them combined into one stream).</p>
  
  <p><em>Note</em>: this question is asking about piping, <em>not</em> redirecting - so it is not a duplicate of the question it's currently marked as a duplicate of.</p>