I am having trouble making this statement work. I am passing in a number value for the number of days to keep archive logs for and wanted to make sure that it is a number. I have a script that will return 1 for is a number and 0 for is not a number. I also want to make sure that the number is not negative. Any help would be appreciated.
Thanks in advance.
Brian
if [ ${CHECKKEEPDAYS} == 0 | ${KEEPDAYS} < 0 ]
then
echo "Days to keep must be numeric and greater than 0!"
exit 1
fi