This question was closed just now as being not a real question. Yet, it was clear the OP experienced an infinite loop where he didn't expect one. The reason for the unexpected program behavior wasn't obvious either. So why was it closed?
Not a real question is too harsh since someone else came in and edited the entire content and context back into the body of the question when there was nothing at all.
Bash scripting is on that line between Stack Overflow and Super User.
Am more inclined to reopen and shift over to Stack Overflow on the coding basis, but it may be closed as too localised or not a real question for not telling us where they think it might be broken instead of, "here, debug this for me".
So the middle man was cut out.
Despite the request for clarification, the author still couldn't really provide us with a problem.
Hey. Thanks. In bash, seems so easy: But the nested while/read loops don't behave as expected ! Endless loop.... Thanks !
Reading the FAQ on Not a real Question, I'll highlight the problems in this post:
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form
Based on simply posting a script, we have the following problems:
- What does this script do?
- What has been tried?
- What is trying to be accomplished here?
So with that, we cannot answer the question properly, and it is closed for that reason.