I am trying to create a shell (ksh) which has two "read" commands, one which reads a line from a file and another which is inside a loop that reads user input from a keyboard. However, the "read" command inside the loop uses the input from the file and it does not get the user input from keyboard.
$ more readtest.ksh
#!/bin/ksh
echo "AAA\nBBB\nCCC" > file
while read line
do
echo "Enter word:"
read word
echo "$line $word"
done < file
Could someone please tell me how to fix the shell above to get user input from keyboard?
Any help will be appreciated.
Steve