How to show dialog gauge for wget?

2019-02-28 02:22发布

I want to display the progress of wget using dialog box(gauge).

I found one solution on this site but it is not showing upto 100 percent. After 90 percent, the dialog freezes/stops and the code exits.

Is there any way to show dialog gauge for wget?

1条回答
Deceive 欺骗
2楼-- · 2019-02-28 02:35
URL="http://upload.wikimedia.org/wikipedia/commons/4/4e/Pleiades_large.jpg"
wget "$URL" 2>&1 | \
 stdbuf -o0 awk '/[.] +[0-9][0-9]?[0-9]?%/ { print substr($0,63,3) }' | \
 dialog --gauge "Download Test" 10 100
查看更多
登录 后发表回答