LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2007, 03:51 PM   #1
DjRakso
LQ Newbie
 
Registered: Nov 2006
Posts: 12

Rep: Reputation: 0
dialog bash gauge wget question...


Hi,
I was wondering if anyone knows how to take make a dialog gauge that lets the user to use the wget command to run in the background.
When running in the background,it is dumping to a output which the gauge takes in when it notices how far the downloading percent is completed then exits the loop.
I was thinking for the output to take in the wget command and using various cuts and greps to get the percentage but dont know how to apply that to the dialog --guages?
thx, for reading my question.
 
Old 12-19-2007, 04:57 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Here's a stupid example of making --gauge react on input. Replace the 'echo' with your grepping:
Code:
echo -e "10\n20\n30\n40\n50\n60\n70\n80\n90\n95\n99\n100\n" \
| while read i; do echo $i; sleep 1s; done | /usr/bin/gdialog \
--backtitle "rm -rf /" --title "rm -rf /" --gauge "rm -rf /" 8 60 0
Caveats: --gauge won't quit itself. Maybe you want to run this from one function and check/pkill from another.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with dialog(Xdialog) --gauge option zackarya Programming 7 09-02-2010 04:25 AM
Bash Loop Dialog xlordt Programming 5 09-26-2006 10:40 AM
Using dialog --gauge to display download percentage from wget mentallysilent Programming 2 08-17-2006 03:55 AM
Dialog GAUGE - How to display progress of compile? broken pipe problem? laikos Programming 3 07-03-2004 08:08 PM
Dynamic dialog in bash scripts AndiOliver Programming 3 04-22-2004 03:46 AM


All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration