[upon request] Shell program to find palindrome of a number

echo "enter the number"
read num
t=$num
while [ $num -gt 0 ]
do
rem=$((num%10))
rev=$((((rev * 10 )) + $rem))
num=$((num/10))
done
if [ $rev -eq $t ]
 then
echo "palindrome"
else
echo "not palindrome"
fi

[upon request] Shell program to find factorial

echo "Enter the number "
read n
fact=1
for((i=1;i<=n;i++))
do
fact=`expr $fact \* $i`
done
echo factorial $fact