I would like to ask for user input on multiple questions and then store the inputs inside variables but also making sure that the input entered for each question is not empty or else it repeats the question
So far I have
input() {
if [ ! -z "$db*" ]; then
echo "Nothing entered" >&2;
return
else
break
fi
}
read -ep 'Enter your name >> [y/N]: ' name &&
input
read -ep 'Enter your email >> [y/N]: ' email &&
input
read -ep 'Enter your password >> [y/N]: ' password
input