digital adj. Having digits.     peer n. A comrade; a companion; a fellow; an associate. inmotion    
   
Recent Articles
Stop DNSMasq From Forwarding Local Hostnames
Saturday, September 25, 2010
Securing your Wireless LAN
Wednesday, August 18, 2010
Some tips and things you might not know about your wireless network.
Using Different Subversion Client Versions
Wednesday, August 18, 2010
Handling a Subversion Repository URL Change
Sunday, May 3, 2009
If your repository URL changes, you can use the following command to fix existing snapshots.
vfat Mounts Default to Lowercase Shortnames
Tuesday, April 21, 2009
I want a "this is brain-damage" quote from Linus for this mess.
VirtualBox or VMWare Virtual Machine at Login
Sunday, April 12, 2009
How to start a virtual machine in X when a user logs in.
Mount JFFS2 Image
Saturday, October 25, 2008
Example of how to mount a JFFS2 image using mtdblock.
Ottawa Linux Symposium 2008
Sunday, July 27, 2008
Here are some pictures from the 2008 Linux Symposium.

A year spent in artificial intelligence is enough to make one believe in God.
- Alan J. Perlis - Epigrams of Programming

Projects-Dialog...

Dialog Progress Bar Through Pipe

Sunday, April 12, 2009 by digitalpeer

The following example creates a named pipe, assigns a file descriptor to it, sub-shells the dialog guage, and communicates progress to it through the pipe.

This is close, but not quite there. The dialog never exits. Maybe somebody else can figure it out.

#!/bin/sh

rm /tmp/fifo
mkfifo /tmp/fifo

exec 5<>/tmp/fifo 

( cat <&5 | dialog --guage "hello world" 10 30 ) &

echo 000 >&5
sleep 0.5
echo 010 >&5
sleep 0.5
echo 020 >&5
sleep 0.5
echo 030 >&5
sleep 0.5
echo 050 >&5
sleep 0.5
echo 080 >&5
sleep 0.5
echo 100 >&5

5<&-

exit 0


Submit Comment to This Article - Be the first!
Please post a comment if you have something to add, find something wrong, or would like more information on the topic at hand. Do not use the comment form to contact the author about unrelated concerns!

Name: Email (optional):
Enter verification number here: