The next phase of this is supposed to check to see if either number entered is indeed a number or it quits the script and asks for a number. The code looks ok in ShellCheck (no errors) but regardless of what is put in, it thinks you didn't enter a number and it kills the script (good news, the exit works).
#!/bin/bash
echo "Please input a whole number"
read -r num1
if [ "$num1" = [0-9] ]; then
echo "Please input another whole number"
read -r num2;
else
echo "Please enter a whole number only";
exit
fi
if [ "$num2" = 0-9 ]; then
echo "Please input function: [a] for addition, [s] for subtraction, [m] for multiply, or [d] for divide";
read -r func
else
echo "Please enter whole number only"
exit
fi
if [ "$func" = "a" ]; then
echo "The sum of the two numbers is " $((num1 + num2))
elif [ "$func" = "s" ]; then
echo "The difference of the two numbers is " $((num1 - num2))
elif [ "$func" = "m" ]; then
echo "The product of the two numbers is "$((num1 * num2))
elif [ "$func" = "d" ]; then
echo "The quotient is (part of answer here) with a whole number remainder of (answer her) "$((num1 / num2))
else
echo "Please select only [a] for addtion, [s] for subtration, [m] for multiply, or [d] for divide"
fi