I am getting a syntax error in the following code. I am trying to print the squares of a number n.
#!/bin/sh
echo "Enter a number n to print squares : "
read num
i=1
while [ $i -le $num ]
do
echo $(expr $i * $i)
i=$(expr $i + 1)
done
echo "Done with Script"
Can someone tell me whats wrong with the code? Thank you guys in advance.