Use expr command to multiply it by 1. If its not a number it will tell you so. If it is a number it will just give you the original number.
Script to do same follows. Just vi a file called "testint.sh" and insert this code. Run it from command line as:
testint.sh INPUT
Where INPUT is the item you are testing. (Make sure to add execute bit with chmod command or run it as "sh testint.sh INPUT" instead.)
Code:
#!/bin/bash
#
# First multiply the input argument times 1. If input is a number this will
# result in original number. Otherwise it will error out. Send output and
# error to /dev/null so they don't show up on screen.
#
# Put that inside a conditional. If return fom the expr command is false it
# is not an integer. If it is true then it is an integer.
if expr $1 \* 1 >/dev/null 2>&1
then echo it is an integer
else echo it is not an integer
fi