我试图在脚本中使用cURL,让它显示进度条.
我试过-s
、-silent
、-S
和-quiet
个选项,但都不管用.
下面是我try 过的一个典型命令:
curl -s http://google.com > temp.html
我只在将其推送到文件时才会看到进度条,所以curl -s http://google.com
没有进度条,但curl -s http://google.com > temp.html
有进度条.
我试图在脚本中使用cURL,让它显示进度条.
我试过-s
、-silent
、-S
和-quiet
个选项,但都不管用.
下面是我try 过的一个典型命令:
curl -s http://google.com > temp.html
我只在将其推送到文件时才会看到进度条,所以curl -s http://google.com
没有进度条,但curl -s http://google.com > temp.html
有进度条.
curl -s http://google.com > temp.html
适用于Ubuntu9.10上的curl版本7.19.5(无进度条).但是,如果由于某种原因,在您的平台上不起作用,您可以始终将stderr重定向到/dev/null:
curl http://google.com 2>/dev/null > temp.html