I have a list of numbers like this:
limit=( '1' '2' '3' '4' '5' '6' '7' '8' '9' )
Then I want to check the input value to see if it exists in the list. For example:
echo 'Type a number from 1 to 9'
read input
if [ "$input" = "limit" ]
then
exit
else
echo 'Wrong number'
Something like that. If I put limit=9 and use [ "$input" -le "$limit" ] it'll accept numbers like 0, -1, and I don't want that.