regular expression not working. grep[^0-9]
echo 8989898989898 |grep [^0-9] > /dev/null 2>&1
if [ "$?" -eq "0" ]
then
echo "inside if "
nrec=1
fi
output shows..
+ echo 8989898989898
+ grep 3
+ 1> /dev/null 2>& 1
+ [ 1 -eq 0 ]
Not sure how grep [^0-9] is converted to 3 . Any help.
|