title: How can I exclude all “permission denied” result lines from “grep”?
body: <p>So, the thing is, I'm on linux terminal using grep command and I want the output without all the lines where it prints at the beginning &quot;grep:&quot; or the lines that begins with &quot;./&quot;, because now I'm getting something like this:</p>
  <pre><code>grep: ./users/blabla1: Permission denied
  grep: ./users/blabla2: Permission denied
  grep: ./users/blabla3: Permission denied
  grep: ./users/blabla4: Permission denied
  grep: ./users/blabla5: Permission denied
  grep: ./users/blabla6: Permission denied
  grep: ./users/blabla7: Permission denied
  grep: ./users/blabla8: Permission denied
  ./foo/bar/log.log
  ./foo/bar/xml.xml
  </code></pre>
  <p>I have tried this:</p>
  <pre><code>grep -irl &quot;foo&quot; . | grep -v &quot;Permission denied&quot;
  </code></pre>
  <p>I have also tried this one:</p>
  <pre><code> grep -irl &quot;foo&quot; . | grep -v &quot;^grep:&quot;
  </code></pre>
  <p>And finally this one:</p>
  <pre><code> grep -irl &quot;foo&quot; . | grep &quot;^./&quot;
  </code></pre>
  <p>But I keep getting same results as if I haven't put anything after the |, any ideas? What am I missing?</p>