Curl – how to hide progress bar

Curl by default shows progress bar. To hide it -s option can be used. We can also add -S to show errors when -s option is used.

Curl with progress bar

$ curl > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 37441    0 37441    0     0  32436      0 --:--:--  0:00:01 --:--:-- 32444

Curl without progress bar (silent mode)

$ curl -sS > /dev/null

This approach may be useful when fetching outcome of curl to a bash variable.

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments