I need to give a value and be able to get the square, and this action must be repeated until the number is 99, I know it will be done with a loop, but I can't find a way to repeat it the way I want, already that of the forms that I have tried, it takes the square of the number that I have entered up to 99 at once, and I want it to do it one by one, until it is a number greater than 99, which in that case will give an error.
I leave you the code that I have so far, I hope you can help me:
#!/bin/bash
echo "Escribe un valor para sacar su cuadrado de 1 a 99"
read A
if [ $A -le 99 ]
then
cuadrado=`expr $A \* $A`
echo "El cuadrado de $A es $cuadrado"
else
echo "Error, el número es mayor que 99"
fi