Stderr of piped shell scripts isn't always displayed

view story

http://unix.stackexchange.com – I piped my own shell scripts for some testing and accidentally noticed something strange. Namely, the stderr of those piped processes isn't always displayed on the screen. I simplified the scripts and here's my session with bash: $ cat file1 echo stdout echo stderr 1>&2 $ cat file2 echo stdout2 echo stderr2 1>&2 $ cat file3 echo stdout3 echo stderr3 1>&2 $ ./file1 | ./file2 | ./file3 stderr2 stderr stdout3 stderr3 $ ./file1 | ./file2 | ./file3 stderr stdout3 stderr3 $ ./file1 | ./file2 | ./file3 stderr2 stdout3 stderr3 I know that the stdout of the first two scripts (HowTos)