Advanced shell scripting question :-)

Michael O'Donnell mod+gnhlug at std.com
Thu Sep 5 13:52:05 EDT 2002


>I was under the impression that the order of was supposed to be preserved 
>because of the pipe mechanism.


Anything that depends on the coordination of
stdout and stderr is b0rken.  Yes, you can
probably get it to work, in your situation with
your configuration during this particular phase
of the moon, but it's b0rken in principle.

If you have the source codes (and the time,
and the will) you could probably arrange
instead for ALL output to be written via
stdout, if it's really imperative that
your diag/error/debug stream be intermixed
with your stdout in synchronous, repeatable
fashion.  Maybe you could write all lines
of diag/error/debug output tagged with some
cookie that could later be used to filter
those lines out.




More information about the gnhlug-discuss mailing list