Method for testing for integer by deleting all the numeric characters and checking whether anything is left over.
The "for" loop is just for testing:
for field in 10.44 11 .6 abcd a3 7z 10000273
do
if [ -z "`echo ${field} | tr -d '[0-9]'`" ]
then
echo "${field} is INTEGER"
else
echo "${field} is NOT INTEGER"
fi
done
10.44 is NOT INTEGER
11 is INTEGER
.6 is NOT INTEGER
abcd is NOT INTEGER
a3 is NOT INTEGER
7z is NOT INTEGER
10000273 is INTEGER
There is an example above about how to test that the valid integer is greater than zero.