title: Show elapsed time every second running a bash script
body: <p>I'm running a shell script in Linux Mint that calls some processes taking few minutes.
  For each process I want to echo a message like this:</p>
  
  <pre><code>echo "Cleaning temporary files... X seconds."
  myprocess
  </code></pre>
  
  <p>where X is the current elapsed time and I would like it to change every second, but not printing a new line.</p>
  
  <p>Is there a good way to do that? I only found ways to print the total time in the end, but not the elapsed time while running the process.</p>