Romeo, might this be a script issue, instead? I seem to recall a similar issue with ksh in a "while read" inside a "while read". IIRC, the issue is that the second read on stdin is waiting for the first read on stdin to finish. And it never does. Probably not the best explanation, but you might code a different approach with better success. Hmmm...on second thought, I looked at your script too quickly. I thought I saw two successive "reads", but now I do not.
Well, for what it's worth, the same code could be run in different shells: ksh, bsh, bash, etc. If it succeeds in ksh and bsh but not in bash, then I'd say you're on to something, here.
------------------------------
Mackey Morgan
------------------------------