to check variable if its non numeric

if test $b -ne [0-9]
then
echo "\n\n\n\tPassword reset has been done successfully"
else
echo "\n\n\n\tAn error occurred"
fi

i want to check whether $b is non-numeric so how to do that?

case "$b" in 
[0-9] ) 
        echo numeric 
        ;;
* ) 
        echo alpha 
        ;;
esac

Thanx porter but in this case i would like to use if then instead of case. Damn! two many cases. lolz

Put the case in a function called isnumeric, then use if to call the function.