title: How to get the upload speed from cURL?
body: <p>When I run below curl upload command it gives me big output. How can I cut short this to just show the final upload speed?</p>
  <pre><code>curl --upload-file /tmp/testlocal -v -u tu**r:******@*23 http://nexus3-core:8081/nexus3/repository/tes******/tes*****
  * Expire in 0 ms for 6 (transfer 0x558e6c881f50)
  * Expire in 1 ms for 1 (transfer 0x558e6c881f50)
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Expire in 0 ms for 1 (transfer 0x558e6c881f50)
  * Expire in 2 ms for 1 (transfer 0x558e6c881f50)
  * Expire in 0 ms for 1 (transfer 0x558e6c881f50)
  * Expire in 1 ms for 1 (transfer 0x558e6c881f50)
  * Expire in 1 ms for 1 (transfer 0x558e6c881f50)
  * Expire in 1 ms for 1 (transfer 0x558e6c881f50)
  *   Trying 172.30.51.207...
  * TCP_NODELAY set
  * Expire in 200 ms for 4 (transfer 0x558e6c881f50)
  * Connected to nexus3-core (172.30.51.207) port 8081 (#0)
  * Server auth using Basic with user 'tu****'
  &gt; PUT /nexus3/repository/testu****/tes**** HTTP/1.1
  &gt; Host: nexus3-core:8081
  &gt; Authorization: Basic dHVzZXI6VHVzZXJAMTIz
  &gt; User-Agent: curl/7.64.0
  &gt; Accept: */*
  &gt; Content-Length: 1048576000
  &gt; Expect: 100-continue
  &gt; 
  * Expire in 1000 ms for 0 (transfer 0x558e6c881f50)
  &lt; HTTP/1.1 100 Continue
  } [41940 bytes data]
  
    4 1000M    0     0    4 45.5M      0  50.7M  0:00:19 --:--:--  0:00:19 50.6M
    8 1000M    0     0    8 89.7M      0  47.3M  0:00:21  0:00:01  0:00:20 47.2M
   13 1000M    0     0   13  139M      0  48.2M  0:00:20  0:00:02  0:00:18 48.2M
   19 1000M    0     0   19  193M      0  49.6M  0:00:20  0:00:03  0:00:17 49.6M
   23 1000M    0     0   23  234M      0  47.9M  0:00:20  0:00:04  0:00:16 47.9M
   29 1000M    0     0   29  291M      0  49.4M  0:00:20  0:00:05  0:00:15 49.2M
   34 1000M    0     0   34  346M      0  50.1M  0:00:19  0:00:06  0:00:13 51.2M
   40 1000M    0     0   40  408M      0  51.7M  0:00:19  0:00:07  0:00:12 53.8M
   46 1000M    0     0   46  465M      0  52.3M  0:00:19  0:00:08  0:00:11 54.3M
   52 1000M    0     0   52  520M      0  52.5M  0:00:19  0:00:09  0:00:10 57.1M
   58 1000M    0     0   58  587M      0  53.9M  0:00:18  0:00:10  0:00:08 59.1M
   64 1000M    0     0   64  648M      0  54.4M  0:00:18  0:00:11  0:00:07 60.3M
   70 1000M    0     0   70  706M      0  54.7M  0:00:18  0:00:12  0:00:06 59.5M
   76 1000M    0     0   76  763M      0  54.9M  0:00:18  0:00:13  0:00:05 59.5M
   78 1000M    0     0   78  781M      0  51.2M  0:00:19  0:00:15  0:00:04 48.7M
   79 1000M    0     0   79  791M      0  49.7M  0:00:20  0:00:15  0:00:05 40.7M
   83 1000M    0     0   83  839M      0  49.6M  0:00:20  0:00:16  0:00:04 38.2M
   89 1000M    0     0   89  895M      0  50.0M  0:00:19  0:00:17  0:00:02 37.8M
   95 1000M    0     0   95  957M      0  50.6M  0:00:19  0:00:18  0:00:01 38.9M* We are completely uploaded and fine
  
  100 1000M    0     0  100 1000M      0  48.6M  0:00:20  0:00:20 --:--:-- 41.0M&lt; HTTP/1.1 201 Created
  &lt; Date: Fri, 08 Jan 2021 06:52:32 GMT
  &lt; Server: Nexus/3.23.0-03 (OSS)
  &lt; X-Content-Type-Options: nosniff
  &lt; Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation
  &lt; X-XSS-Protection: 1; mode=block
  &lt; Content-Length: 0
  &lt; 
  
  100 1000M    0     0  100 1000M      0  47.9M  0:00:20  0:00:20 --:--:-- 41.9M
  </code></pre>
  <p><strong>My desired out put is as below</strong></p>
  <p>Curl upload speed : 41.9M</p>
  <p>I know curl prints stderr and I am struggling to get that output with <code>grep</code></p>