Write a shell script to generate the factorial of a given number entered through keyboard.

echo ” Enter any number “
read n
temp=$(($n-1))
while [ $temp -gt 1 ]; do
            n=$((n * temp))
            temp=$((temp – 1))
done
echo “Factorial of number is $n”