title: tee to a compressed file
body: <p>tee reads from standard input and writes to standard output and a file. </p>
  
  <pre><code>some_command |&amp; tee log
  </code></pre>
  
  <p>Is that possible for tee to write to a compressed file?</p>
  
  <pre><code>some_command |&amp; tee -some_option log.bz2
  </code></pre>
  
  <p>If tee can not do that, is there any other command?</p>
  
  <p>I can redirect the output to a compressed file with</p>
  
  <pre><code>some_command |&amp; bzip2 &gt; log.bz2
  </code></pre>
  
  <p>But with this command, the output to standard output is missing.</p>