title: How to use dpkg in silent mode
body: <p>I try to test if some packages are installed in my script before run it. 
  To do that by the dpkg command. This is my code :</p>
  
  <pre><code>dpkg -s dialog
  dialogStatut=$?
  
  if [ "$dialogStatut" -eq 1 ]; then
      //Install package
  fi 
  </code></pre>
  
  <p>I would like to make dpkg in silent mode (without echo).
  I have tried to put >&amp;- 2>&amp;- behind the command but if i do that the value is always 2 (if dialog is installed or not). </p>
  
  <p>I have don't find solution in man dpkg.
  What is the best way to do that? </p>