Only Digits as input
Hi All,
I am new to shell script.
I wrote a very small script that takes only digits as input-
but there is some problem in that.can you help me in debugging that.
#!/bin/ksh
echo "Digits as input"
read number
digit='eval [0-9][0-9][0-9]'
if [[ number -eq $digit ]]
then
echo "Entered number is a digit"
else
echo "0"
fi
Please modify this one or without AWK give me some inputs.
Thanks,
Namish
|