Hi,
'read' command is not working inside the while loop, How can I solve this?
Rgds,
Sharif.
Hi,
'read' command is not working inside the while loop, How can I solve this?
Rgds,
Sharif.
My guess is that you are using a "while read" loop and redirecting a file to standard input. If you want to read from the controlling terminal during the loop, try...
read REPLY < /dev/tty
Or use a different file descriptor for the loop...
exec 3<file1
while read -u3 LINE
do
echo $LINE
read REPLY
: etc
done
exec 3<&-