title: Remove netstat output (specifically Not all processes could be identified line)
body: <p>I'm having trouble removing the output from the netstat command when I check if a current port is being used. I dont need the output of the command but rather just the error code. </p>
  
  <p>Running <code>netstat -anp | grep 1521 &amp;&gt;/dev/null</code> results in </p>
  
  <pre><code>(Not all processes could be identified, non-owned process info
   will not be shown, you would have to be root to see it all.)
  </code></pre>
  
  <p>being shown as the output. I have also tried: </p>
  
  <pre><code>2&gt;/dev/null| cut -d' ' -f45-50 | sed 's/[^0-9]*//g'
  </code></pre>
  
  <p>which just results in a bunch of empty lines after the Not all processes... output but still displays that in the output.</p>