如何显示 wget 的对话框仪表? [英] How to show dialog gauge for wget?
本文介绍了如何显示 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屋!
查看全文