title: bash printf - how to align text to right in the same line without deleting previous output
body: <p>I'm trying to have in script <code>Done</code> or <code>Fail</code> statuses aligned to the right of previous text. But not e.g. 50 chars from last character, but 50 chars from left side of terminal. I'm not printing it using single, but multiple <code>printf</code>'s. In code I have e.g.</p>
  
  <pre><code>    printf "Creating folder..."
      sleep 2
      mkdir foo
      printf "\r%50.10s\n" "Done"
  </code></pre>
  
  <p>Unfortunately it keeps me outputting</p>
  
  <pre><code>                                                  Done
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>    Creating folder...                            Done
  </code></pre>
  
  <p>Is there a possibility to align text to right in the same line without deleting previous output?</p>
  
  <p>Debian 8, bash 4.3.30</p>