title: How do I get cURL to not show the progress bar but still give statistics?
body: <p>Notice that this question is distinctly different from <a href="https://stackoverflow.com/questions/7373752/how-do-i-get-curl-to-not-show-the-progress-bar">How do I get cURL to not show the progress bar?</a> though a valid answer to this question would likely suffice <a href="https://stackoverflow.com/questions/7373752/how-do-i-get-curl-to-not-show-the-progress-bar#comment70571666_21109454">this comment</a> on that other question.</p>
  
  <p>I have a script that is logging cURL's <code>stderr</code> to a file. We'll use this as an example:</p>
  
  <pre><code>curl -Lo /dev/null stackoverflow.com 2&gt;/tmp/foo
  </code></pre>
  
  <p>When I inspect that file, it looks like this:</p>
  
  <pre><code>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  ^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0^M100   143  100   143    0     0   1190      0 --:--:-- --:--:-- --:--:--  1191
  ^M 97  244k   97  239k    0     0   688k      0 --:--:-- --:--:-- --:--:--  688k^M100  244k  100  244k    0     0   701k      0 --:--:-- --:--:-- --:--:-- 4974k
  </code></pre>
  
  <p>And that's total garbage to me. I want the <strong>statistics</strong> without the <strong>animated progress bar</strong>. I can parse it out with some standard unix tools. However, I'm thinking maybe some combination of arguments and/or termcap/terminfo may also work.</p>
  
  <p>Please advise.</p>
  
  <hr>
  
  <p>This simple post processing would work because it's not animated:</p>
  
  <pre><code>head -n2 /tmp/foo; tail -n1 /tmp/foo
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100  245k  100  245k    0     0   393k      0 --:--:-- --:--:-- --:--:--  393k
  </code></pre>