I'm trying to use cURL in a script and get it to not show the progress bar.
I've tried the -s
, -silent
, -S
, and -quiet
options, but none of them work.
Here's a typical command I've tried:
curl -s http://google.com > temp.html
I only get the progress bar when pushing it to a file, so curl -s http://google.com
doesn't have a progress bar, but curl -s http://google.com > temp.html
does.
curl -s http://google.com > temp.html
works for curl version 7.19.5 on Ubuntu 9.10 (no progress bar). But if for some reason that does not work on your platform, you could always redirect stderr to /dev/null:
curl http://google.com 2>/dev/null > temp.html
I should have thought of that. It'll hide error messages too, though.
In my case, it's okay to use /dev/null.
Nice - this works great. I had the problem on centOS 6.3, but not on other distros - bizarre, but simple easy workaround - thx!
by the way, see below link about
2>/dev/null
if you don't know: stackoverflow.com/questions/10508843/what-is-dev-null-21According to the man page for an installation of curl on an ubuntu 14 host,
-s
will make curl not "show progress meter or error messages". (I haven't tried testing or reading source code to see if that is really true.)