On Wed, Aug 26, 2009 at 9:19 PM, David Woodfall <span dir="ltr">&lt;<a href="mailto:dave@unrealize.co.uk">dave@unrealize.co.uk</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
For Chess and friends.<br>
<br>
I was chatting with someone in #slackware the other day about making a<br>
download metre bar in dialog. Well I took up the challenge and this is<br>
what I came up with:<br>
<br>
<a href="http://www.unrealize.co.uk/scripts/bash/wget-dialog-example" target="_blank">http://www.unrealize.co.uk/scripts/bash/wget-dialog-example</a><br>
<br>
I thought it would be pretty neat way to see progress rather than<br>
having wget output scroll in console. <br>
Hope you find it useful<br>
<br>
Cheers<br>
David (aka dive)</blockquote><div><br>Interesting hack, thank you.<br><br>I too don&#39;t like the dotted wget style much, so I prefer to set --progress=bar:force in WGETFLAGS which results in a nice text progress bar.<br>
<br>If you really like the dialog approach, the following is a much simpler implementation (which I believe to be roughly equivalent):<br><br>wget --progress=bar:force $URL 2&gt;&amp;1 | while read -d &quot;%&quot; X; do sed &#39;s:^.*[^0-9]\([0-9]*\)$:\1:&#39; &lt;&lt;&lt; &quot;$X&quot;; done | dialog --title &quot;foo&quot; --gauge &quot;bar&quot; 25 40<br>
<br>That being said, I&#39;m dubious about a dialog progress bar because that way processing a queue would continuously switch between a dialog environment (download) and a non-dialog environment (build). IIRC the build itself has been moved out of a dialog environment since it was somewhat problematic.<br>
<br>--<br></div></div>Mauro Giachero<br>