My target is to verify a range of number with (only with case + esac), and print the range. So for example:
- If the number is between 0 and 80, print
>=0<=80 - If the number is between 81 and 100 then print
>=81<=100 - etc.
The problem with my script below print only >=0<=90 only if the number between 0 and 9.
How to fix my script, so that it will print correct output according to the number range?
#!/bin/ksh
read number
case $number in
[0-80]) echo ">=0<=80";;
[81-100]) echo ">=81<=100";;
[101-120]) echo ">=101<=120";;
[121-300]) echo ">=121<=300";;
esac
