I have a shell script and I have provided answers for the script through answers.txt file.
echo -n "Enter your name: "; read name echo -n "Enter your number: "; read number echo "Your name is $name and your number is $number"
I run this script using
script.sh < answers.txt
The answer file is dynamic, means user can add more names and numbers in the answer file.
Buvanesh 12345 Kanna 45678
In that case, if I run the script it will take only first two inputs. I want to take shell script all inputs and give output accordingly. I guess I have to implement a loop, but I don't know exactly how to for this case. Can anyone help me with this?