title: executing bash loop while command is running
body: <p>I want to build a bash script that executes a command and in the meanwhile performs other stuff, with the possibility of killing the command if the script is killed. Say, executes a cp of a large file and in the meanwhile prints the elapsed time since copy started, but if the script is killed it kills also the copy. 
  I <em>don't</em> want to use rsync, for 2 reasons: 1) is slow and 2) I want to learn how to do it, it could be useful.
  I tried this:</p>
  
  <pre><code>until cp SOURCE DEST
  do
  #evaluates time, stuff, commands, file dimensions, not important now
  #and echoes something
  done
  </code></pre>
  
  <p>but it doesn't execute the <code>do - done</code> block, as it is waiting that the copy ends. Could you please suggest something? </p>