title: How to delete and replace last line in the terminal using bash?
body: <p>I want to implement a progress bar showing elapsed seconds in bash. For this, I need to erase the last line shown on the screen (command "clear" erases all the screen, but I need to erase only the line of the progress bar and replace it with the new information).</p>
  
  <p>Final result should look like:</p>
  
  <pre><code>$ Elapsed time 5 seconds
  </code></pre>
  
  <p>Then after 10 seconds i want to replace this sentence (in the same position in the screen) by:</p>
  
  <pre><code>$ Elapsed time 15 seconds
  </code></pre>