> Sat, Apr 20, 2024 at 16:45 Carl Edquist wrote: > > However, stdout
and stderr are still separate streams even if they refer to the same output
file/pipe/device, so partial lines are not interleaved in the order that they
were printed. > > will output "abc\n123\n" instead of
"a1b2c3\n\n", even if you run it as > $ ./abc123 2>&1 | cat
It seems that it's 'interleaved' when buffer is written to a file
or pipe, and because stdout is buffered it waits until buffer is full or
flushed, while stderr is not and it doesn't wait and write immediately.