When a 'read -p "line of text."' built-in is placed inside a while loop which
has redirected input to another read built-in, the read command inside the
while loop does not execute. I know this sounds vague, but see the example
and it will make more sense.
Unless you tell it otherwise, read gets its input from stdin,
which is redefined for the entire loop. If you want it from
somewhere else, redirect the inoput for that read statement, e.g.:
read -p "Looping.. press a key." < /dev/tty
Repeat-By:
#!/bin/bash
read -p "hello press a key."
while read a b c ; do
echo $a
read -p "Looping.. press a key." <--- This 'read' will not execute.
To see what this command has read:
echo REPLY=$REPLY