Como validar um número de celular no script de shell
85625566595
Condemned Coyote
85625566595
echo "Enter a phone number as XXXXXXXX: "
read phoneNumber
pat="^[0-9]{8}$"
while [[ ! $phoneNumber =~ $pat ]]
do
echo "Please enter a phone number as XXXXXXXX: "
read phoneNumber
done
echo $phoneNumber
#!/bin/bash
echo "Enter a phone number as XXXXXXXX: "
read phoneNumber
pat="^[0-9]{8}$"
while [[ ! $phoneNumber =~ $pat ]]
do
echo "Please enter a phone number as XXXXXXXX: "
read phoneNumber
done
echo $phoneNumber