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.
|