I want to ask a user for an input such as:
Echo "Please enter name: "
read name
read -r -p "Is this a costumer? (Y/N)" response;
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "Please enter name: "
read name
AreYouDone
else
"Please enter name "
read name2
AreYouDone
fi
echo $name is a costumer
echo $name2 is an employer
The idea is to keep asking for name and name2 and print them all at the end depending on the Y/N answer.
But how do I store them into different variables?**
There may be 20 names and some are costumer and some employer.
P.S.:
To clear any confusion, if there is any, AreYouDone is just a function that'll just exit out of the program when the costumer is done and implemented already.
Thanks.