title: Save curl download statistics / log
body: <p>I'm reading a stream with curl and grep some highlights. </p>
  
  <pre><code>curl url | grep desired_key_word
  </code></pre>
  
  <p>I've noticed that curl is providing me some nice download statistics such as:</p>
  
  <pre><code>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100 10.9M    0 10.9M    0     0  1008k      0 --:--:--  0:00:11 --:--:-- 1092k
  </code></pre>
  
  <p>How can I save those statistics e.g. every second in a file?</p>
  
  <p>I found this: <a href="http://curl.haxx.se/mail/archive-2002-11/0115.html" rel="nofollow noreferrer">http://curl.haxx.se/mail/archive-2002-11/0115.html</a> however it was not able to abstract it to my problem.</p>
  
  <pre><code>curl -n agent.mtconnect.org/sample\?interval=0 -o xml_stream.log 2&gt;&gt; dl.log
  </code></pre>
  
  <p>The dl.log should have the statistics included, however is does not work.</p>