Advanced shell scripting question :-)

Kevin D. Clark kclark at CetaceanNetworks.com
Thu Sep 5 15:33:56 EDT 2002


"Steven W. Orr" <steveo at syslang.net> writes:

> The 
> problem is that the order coming out is vastly different than the order 
> that appears on the console. By all appearances, the console output *is* 
> the *correct* output.

But the order that you see in the combined file isn't incorrect either.

> So if the order *is* being preserved, how can the 
> content of the BOTH file be different than that appearing on the console?

> I was suspecting that this is somehow STREAMS related, but the problem is 
> duplicated on both Linux and Solaris (which is STREAMS based). 

This problem has nothing to do with STREAMS.

> I can live with the problem not having a solution; I just really want to 
> know *why*. :-(

Really, I already told you what is happening:

: Your problem has to do with stdio buffering, the fact that the stdio
: library does different things with this buffering when the output is
: connected to a terminal versus something else (fully-buffered versus
: line buffering), and the whim of the kernel and the scheduler.

Regards,

--kevin
-- 
Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
alumni.unh.edu!kdc




More information about the gnhlug-discuss mailing list