How do I test if a variable is a number in Bash?
07:58 30 Apr 2009

I just can't figure out how do I make sure an argument passed to my script is a number or not.

All I want to do is something like this:

test *isnumber* $1 && VAR=$1 || echo "need a number"

Any help?

bash shell