Possible Duplicate:
How do I test if a variable is a number in bash?
I am new to bash scripts. Needed a code to check whether a variable is a number, if YES i have to keep it as it, if NO i ll have to reassign it to some other value. How do I get this done?