title: Force flushing of output to a file while bash script is still running
body: <p>I have a small script, which is called daily by crontab using the following command:</p>
  
  <pre><code>/homedir/MyScript &amp;&gt; some_log.log
  </code></pre>
  
  <p>The problem with this method is that some_log.log is only created after MyScript finishes. I would like to flush the output of the program into the file while it's running so I could do things like </p>
  
  <pre><code>tail -f some_log.log
  </code></pre>
  
  <p>and keep track of the progress, etc.</p>