Hey guys, I'm trying to prompt the user to enter Y or N in the middle of a while loop, but the read command is simply drawing in the next value.
I'm reading from a simple file full of words (one per line)
while read line
grep $line dict #check if its in dictionary file
if [ $? -ne 1 ]
echo Match found
echo "Would you like to add '$line' to the dictionary? (Y / N)"
echo "you said $promptadd"
done < myfile
The read line automatically takes the value of the next word from the file here. How do I interrupt and make it so the user is prompted?