|
read user input from within a wile loop that is being fed from below
hi!
i need to do a ksh script that uses a wile loop that is fed form below
while read line
do
some things
done < myfile
inside the while loop i need to read user input to ask the user what he wants to do, but "read" reads the file, and not the standard input
while read line
do
some thingys
read answer?'what you want to do?'
if and more thingys upon the answer
done < myfile
is that possible ? if so, how to tell the inner read to use stdin ?
if its not possible (i cant be the only one), how is this commonly fixed ? the file i read can get huge for using arrays, so i dont know
thanks
|