View Single Post
Old 07-19-2011, 03:32 AM   #24
mobad
Enthusiast
mobad began at the beginning.
 
Posts: 27
Karma: 23
Join Date: Jan 2011
Device: Kindle 3 WiFi
Don't have much time to test anything at the moment but I'll check it this weekend...

A better way to monitor the pipe would be to use something like:
while read key ; do blah ; done < /tmp/pipe
Not 100% sure if that will work directly but the "read" command is probably what you want.
(tail -f would probably work as well but read is better)

By the way what I meant with { } and [[ ]] was
( blah ; blah ; blah ) is slower than { blah ; blah ; blah ; } as () has to spawn a subshell.
if [ blah ]; is slower than if [[ blah ]]; as [[ ]] is a native bash command.

Last edited by mobad; 07-20-2011 at 09:02 PM.
mobad is offline   Reply With Quote