This sounds like the old suffering from buffering problem. That link describes it far better than i can, so I won't say much more, but you may also find $| and select have some more info too. HTH.
Just a something something...
Comment on Re: Script output sometimes gets jumbled