小编典典

如何获取cURL以不显示进度栏?

linux

我正在尝试在脚本中使用cURL,并使其 显示进度栏。

我已经试过了-s-silent-S,和-quiet选择,但他们没有工作。

这是我尝试过的典型命令:

curl -s http://google.com > temp.html

我只在将进度条推送到文件时才得到进度条,所以curl -s http://google.com没有进度条,但是curl -s http://google.com > temp.html有。


阅读 1158

收藏
2020-06-02

共1个答案

小编典典

curl -s http://google.com > temp.html

适用于Ubuntu 9.10上的curl版本7.19.5(无进度条)。但是,如果由于某种原因在您的平台上不起作用,则可以始终将stderr重定向到/ dev
/ null:

curl  http://google.com 2>/dev/null > temp.html
2020-06-02