I'm creating a shell script to perform basic math operations using WSL. Im using ubuntu terminal for this purpose.
#!/bin/bash
echo "+ : Addition (a+b)"
echo "- : Subtraction (a-b)"
echo "* : Multiplication (a*b)"
echo "/ : Division (a/b)"
read -p "Choose operation: " op
read -p "Enter value of a: " a
read -p "Enter value of b: " b
case $op in
"+")
echo $a "+" $b "=" $((a+b))
;;
"-")
echo $a "-" $b "=" $((a-b))
;;
"*")
echo $a "*" $b "=" $((a*b))
;;
"/")
echo $a "/" $b "=" $((a/b))
;;
esac
this is the code. Im executing this code using command
sh add.sh
"add.sh" is the file name
and I'm getting