title: Bash: Overwrite previous echo command
body: <pre><code>for i in {1..5};do
    echo $i/5
  done
  </code></pre>
  
  <p>will echo</p>
  
  <pre><code>1/5
  2/5
  3/5
  4/5
  5/5
  </code></pre>
  
  <p>Is it possible to overwrite the previous echoed/printed line at every iteration? The program should echo <code>1/5</code> and then <code>2/5</code> instead of <code>1/5</code> and then <code>3/5</code>, etc. At the end of the program only one line which contains <code>5/5</code> should be left.</p>