I'm trying to write a function that rewrites a value according to a user's choice. So far it looks like this:
while [[ $code_id != [1-28] ]]; do
echo "Please select a value..."
echo "1. A"
echo "2. B"
echo "3. C"
echo "4. D"
...
echo "28. Z"
done
echo "INFO: Code is $code_id."
The user should write a chosen number (1-28). But as a result, code returns me, for a choice. I understand what reason in a condition (while... do), but how I should write this for my code to work?