title: How to log output in bash and see it in the terminal at the same time?
body: <p>I have some scripts where I need to see the output <strong>and</strong> log the result to a file, with the simplest example being:</p>
  
  <pre><code>$ update-client &gt; my.log
  </code></pre>
  
  <p>I want to be able to see the output of the command while it's running, but also have it logged to the file. I also log <code>stderr</code>, so I would want to be able to log the error stream while seeing it as well.</p>