price=\"1.11\" case $price in \'\'|*[!0-9]*) echo \"It is not an integer.\"; ;; esac
Output: It is not an integer
Try this regular expression ^(0*[1-9][0-9]*(\.[0-9]+)?|0+\.[0-9]*[1-9][0-9]*)$
^(0*[1-9][0-9]*(\.[0-9]+)?|0+\.[0-9]*[1-9][0-9]*)$