Bob Proulx wrote:
Chet Ramey wrote:
Linda Walsh wrote:
Ideas?
You're probably running into grep (and sort, and sed) buffering its
output.  I haven't been able to figure out a way past that.

This may be a good point to mention this reference:

  http://www.pixelbeat.org/programming/stdio_buffering/

And the 'stdbuf' command the came out of it.

  
http://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html#stdbuf-invocation

Bob
====
        Interesting -- it modifies the buffering on the command it invokes?

Does it only work with gnu programs? I.e. how would they know to not buffer
their i/o?  I'll have to try it with that and see if it affects the problem,
but given the size of the I/O buffs (4-8K?)  I figured that the coproc
would have held all of the output (it was 3 lines out of a bunch), until I
closed it's stdin.

        I don't think the stdbuf will help if the child has it's own input
pipe open...if it does, I can try closing it, but i just expected that to be
done automatically as with pipes...but maybe that was a step too far.

        Thanks for the pointer!

Reply via email to