How to show wget progress bar only?

前端 未结 9 996
情歌与酒
情歌与酒 2021-01-30 06:19

For example:

wget http://somesite.com/TheFile.jpeg

downloading: TheFile.tar.gz ...
--09:30:42--  http://somesite.com/TheFile.jpeg
                   


        
9条回答
  •  独厮守ぢ
    2021-01-30 06:49

    This is not literally an answer but this snippet might also be helpful to some coming here for e.g. "zenity wget GUI":

    LANG=C wget -O /dev/null --progress=bar:force:noscroll --limit-rate 5k http://nightly.altlinux.org/sisyphus/ChangeLog 2>&1 | stdbuf -i0 -o0 -e0 tr '>' '\n' | stdbuf -i0 -o0 -e0 sed -rn 's/^.*\<([0-9]+)%\[.*$/\1/p' | zenity --progress --auto-close

    What was crucial for me is stdbuf(1).

提交回复
热议问题