Wait for keyboard input inside a while-read loop (2 Solutions!!)