I have a situation where I want the user to enter only numbers in response to a READ command. I have some validation to restrict the number to be between 1 and 12, but if the user type in some characters the script echoes some error message and goes to the next command. Below is a snippet of the script. Thanks in advance for any help.
period=0
while [ $period -lt 1 ] || [ $period -gt 12 ]
do
echo Export Period?
read period
done