How to test for a range of digits?
Hi, I intend to test the equality of a variable to a range of digits or characters, something like this:
if [ "$line3" == [0-9] ]
then echo "$line3"
fi
I am aware that I could do it one at a time by not using [0-9] but it will be a longer code. Any help will be appreciated. Thanks a lot.
Last edited by btacuso; 05-20-2009 at 07:10 PM.
|