title: Hide error message in bash
body: <p>I have problem to hide error message from shell command as the following case.</p>
  
  <pre><code>firs_line=$(head -n 1 file) &gt; /dev/null 2&gt;&amp;1
  </code></pre>
  
  <p>I expect that the error message will be hidden but actually it doesn't.
  How to get output while <code>head</code> command is executed successfully but hide error message when it fails?</p>
  
  <p>Thanks in advance.</p>