title: NodeJS script to show update per line in console
body: <p>I have a small command line program written in NodeJS to process all text files in a given directory. Since Node is asynch the script will read all the files, process them and output something like this</p>
  
  <pre><code>Converting file: example-file-1.txt
  Converting file: example-file-2.txt
  Converting file: example-file-3.txt
  Converting file: example-file-4.txt
  File example-file-3.txt converted!
  File example-file-1.txt converted!
  File example-file-2.txt converted!
  File example-file-4.txt converted!
  </code></pre>
  
  <p>This is not very pretty, the "converted" messages are not in order as the files are different size and are finished processing at different speeds.<br>
  What I'd like to see is something like this</p>
  
  <pre><code>File example-file-1.txt: DONE! // processing of this file has finished
  File example-file-2.txt: converting... // this file is still processing
  File example-file-3.txt: DONE!
  File example-file-4.txt: converting...
  </code></pre>
  
  <p>The most right part of each line should be dynamically updated with progress.  </p>
  
  <p>What I'm really asking here is how to display in console a few lines of messages that I can update as the script progresses?</p>