This is similar to your question of yesterday and a few simple typing errors need fixing:
result=0
if [ "$2" = + ]
then
result=$(($1 + $3))
echo $result
elif [ "$2" = - ]
then
result=$(($1 - $3))
echo $result
elif [ "$2" = x ]
then
result=$(($1 * $3))
echo $result
else
echo "Unknown Operator"
fi
Note, as I mentioned yesterday the expressions in square brackets require
spaces after the opening bracket and before the closing one. And $((e)) expressions require
two closing parentheses. Please try at least desk checking your code.
And the '*' character has a special meaning to the shell so cannot be used in the command line. I have used a small x instead.