如何显示wget的对话框? [英] How to show dialog gauge for wget?

查看:196
本文介绍了如何显示wget的对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用对话框( gauge )显示 wget 的进度。

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

我在这个网站上找到了一个解决方案 但它不显示100%。 90%以后,对话框冻结/停止,代码退出。

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.

有没有办法显示wget的对话框?

Is there any way to show dialog gauge for wget?

推荐答案

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

这篇关于如何显示wget的对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆