echo 'enter "num1" operation "num2" (space separated)' while read num1 operation num2 do case $operation in (+) result=$((num1 + num2)) ;; (-) result=$((num1 - num2)) ;; (\*) result=$((num1 * num2)) ;; (/) result=$((num1 / num2)) ;; (*) result="Invalid input" esac printf "%s\n" "$result" done