title: Redirecting stdout of EOF
body: <p>I want to redirect the error and output streams to <code>/dev/null</code> and I used <code>2&gt;&amp;1 /dev/null</code> in my script file (below) but I am getting error as</p>
  
  <pre><code>"UPDATE 1
  UPDATE 1
  UPDATE 1
  UPDATE 1
  ERROR:  syntax error at or near "EOF"
  LINE 1: EOF 2&gt;&amp;1 /dev/null"        ^
  </code></pre>
  
  <p>How to redirect stdout?</p>
  
  <h1>File:</h1>
  
  <pre><code>psql -h xx.xx.xx.xx -U postgres -d dbname 
  
  &lt;&lt;
  
  update rhq_alert_condition set threshold = $critical_threshold  where alert_definition_id = $critical_id;
  update rhq_alert_condition set threshold = $critical_threshold  where alert_definition_id = $critical_recovery_id;
  update rhq_alert_condition set threshold = $warning_threshold  where alert_definition_id = $warning_id;
  update rhq_alert_condition set threshold = $warning_threshold  where alert_definition_id = $warning_recovery_id;
  
  EOF
  
  2&gt;&amp;1 /dev/null
  </code></pre>