title: Overwrite last line on terminal
body: <p>My bash-script looks as following:</p>
  <pre><code>echo &quot;Description:&quot;
  while [ $finishInput -eq 0 ]; do
    read tmp
    desc=&quot;$desc&quot;$'\n'&quot;$tmp&quot;
    if [ -z &quot;$tmp&quot; ]; then
      finishInput=&quot;1&quot;
    fi
  done
  echo -n &quot;Maintainer:&quot;
  read maintainer
  </code></pre>
  <p>It reads to the desc var until a empty line is passed. After that, i want to read in other stuff.</p>
  <p>When executing my current script it looks like this:</p>
  <pre><code>Description:
  Line 1
  Line 2
  
  Maintainer:
  </code></pre>
  <p>I would like to overwrite the last empty line with the &quot;Maintainer:&quot;.</p>
  <p>I searched for a solution but only found suggestions which were like</p>
  <pre><code>echo -n &quot;Old line&quot;
  echo -e &quot;\r new line&quot;
  </code></pre>
  <p>which stays on the line and overwrites it. This is not possible in my case.</p>