why is it that when i used the value with zero,comparing two integers,it seems that i got the wrong ouput?
Please consider the ff:
#!/bin/ksh
echo "63918000009" > k
cat k
read x < k
(( aj=63918000009 ))
if
[ ! -d "$x" = "$aj" ]
then
echo "$aj"
elif
[ "$k" = "$aa" ]
then
echo "$aa"
else
echo "done"
fi
exit 99
--------------
OUTPUT:
63918000009
-506509431
********but if:***** consider the 000009 that i removed from the first script.
#!/bin/ksh
echo "63918" > k
cat k
read x < k
(( aj=63918 ))
(( aa=12346 ))
if
[ ! -d "$x" = "$aj" ]
then
echo "$aj"
elif
[ "$k" = "$aa" ]
then
echo "$aa"
else
echo "done"
fi
exit 99
-----------
OUPUT:
63918
63918
Thanks..