title: pipe here document command to log file
body: <p>Quite often I'll use the following construct to pipe output to a log file, keeping the output also on the display</p>
  
  <pre><code>./command 2&gt;&amp;1 | tee output.log
  </code></pre>
  
  <p>I'm trying to do something similar, but with using a here document:</p>
  
  <pre><code>./command &lt;&lt; HEREDOC
  params
  HEREDOC 2&gt;&amp;1 | tee output.log
  </code></pre>
  
  <p>This doesn't work - is it possible to achieve this?</p>