title: Why should piping be avoided in bash scripts?
body: <p>Most of the time I see someone suggesting using a pipe in a bash script there is someone pointing out not to use it and instead use only one command.</p>
  
  <p>Example:</p>
  
  <pre><code>find $dir -name $pattern
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>ls $dir | grep $pattern
  </code></pre>
  
  <p>Is there another reason than look to avoid pipe?</p>