I am trying to write a script that raises a integer (m) by a exponent (n) using a while loop
ex. 5 raised to the power of 2 ..
I am a beginner and i dont know what is the opperand or command i have to use to make this happen..this is what i have so far...
echo "Enter a integer for the base"
read m
echo "Enter a positve integer for the power"
read n
while [ $m -gt 0 ]
do
exp=$(( m ^ n ))
echo $exp
done
This just gives a infinite loop of the sum...can someone please help?
---------- Post updated 10-19-10 at 01:52 AM ---------- Previous update was 10-18-10 at 09:32 PM ----------
Ok .. i got this far but i cant make it display the output without it going to an infinite loop:(! Please help! 
c=0
i=1
echo "Enter an integer for the base"
read m
echo "Enter Enter a positive integer for the power"
read n
while (( i > 0 ))
do
c=$(($m**$n))
done
echo "The product of the numbers is: $c"
if i insert
echo "echo "The product of the numbers is: $c"
it goes into an infinite loop giving me the answer...if i don't...it just keeps asking me for the second integer!
you're not doing anything that requires a loop! Remove the while loop and your problems are solved!