Warm tip: This article is reproduced from stackoverflow.com, please click
bash curl linux scripting unix

How do I get cURL to not show the progress bar?

发布于 2020-04-18 10:13:33

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.

Questioner
adammenges
Viewed
57
unutbu 2011-09-11 03:04
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