title: Silence output in bash script using function advisable?
body: <p>Suppose, someone is writing bash script in which it is needed to silent stdout,stderr and provide custom output.</p>
  
  <p>Is it advisable to use function like below:</p>
  
  <pre><code>dump(){
      "$@" &gt; /dev/null 2&gt;&amp;1
  }
  </code></pre>
  
  <p>And, then</p>
  
  <pre><code>dump rm filename || echo "custom-message"
  </code></pre>
  
  <p>What are the possible cases where it fails to function as expected?</p>