title: How to continuously show command output in bash?
body: <p>I have a code in my bash script </p>
  
  <p><code>OUTPUT=""yum update</code></p>
  
  <p><code>echo $OUTPUT</code></p>
  
  <p><code>echo $OUTPUT &gt;&gt; mylogfile</code></p>
  
  <p><code>yum update</code>is a very long command and without my script it always output something to console, but in my script it starts, for the long time nothing outputs and after a while outputs a lof of data.
  Is any way in my script to output data as soon as it is available, but not all data in the same time after long waiting? </p>