Could someone tell me what’s wrong this code:
while true
do
echo "1. Add"
echo "2. Subtract"
echo "3. Multiply"
echo "4. Divide"
echo "5. Quit"
read -p "enter your choice: " choice
if [ $choice -ep 1 ]
then
echo Let's add 2 numbers...
read -p "Enter Number1:" number1
read -p "Enter Number2:" number2
echo The answer is: $(( $number1 + $number2 ))
elif [ $choice -eq 2 ]
then
echo Let's subtract 2 numbers...
read -p "Enter Number1:" number1
read -p "Enter Number2:" number2
echo The answer is: $(($number1 - $number2))
elif [ $choice -eq 3 ]
then
echo Let's multiply 2 numbers...
read -p "Enter Number1:" number1
read -p "Enter Number2:" number2
echo The answer is: $(($number1 * $number2))
elif [ $choice -eq 4 ]
then
echo Let's divide 2 numbers...
read -p "Enter Number1:" number1
read -p "Enter Number2:" number2
echo The answer is: $(($number1 / $number2))
elif [ $choice -ep 5 ]
then
break
fi
done
thanks a lot!