Hi folks.
I am still trying to get myself into bash scripting and programming.
I guess below problem is a pretty simple issue for an experienced programmer.
How can I solve following issue? I'd like to check if an input fits
into a range of numbers, which are set by variables? I just couldn't figure it out by myself.
Below of course won't work. It's supposed to visualize what I would like to do.
THX
Code:
#!/bin/bash
number=0
rangestart=0
rangeend=100
while : ; do
read -p "Enter number: " number ; echo "$number"
case $number in
[$rangestart-$rangeend] ) echo "Hit" ;;
* ) echo "Blank" ;;
esac
done
exit 0