Answer the question
In order to leave comments, you need to log in
How to make read parameter return in bash?
Good day, there is a simple script
regexp="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,2}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$"
read name
if ; then
echo "Доменное имя введено верно"
else
echo "Доменное имя введено неверно"
fi
Answer the question
In order to leave comments, you need to log in
regexp="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,2}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$"
while :
do
read name
if
then
echo "Доменное имя введено верно"
break
else
echo "Доменное имя введено неверно"
fi
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question