Hi,
I've been working on a few scripts and have been getting great info.
How, would I include in the below script, how I would let a user know that if they divide a SECOND number by zero, that they would get a divide by zero error? What's the easiest way of working this?
Cordially,
joe.
I think I asked this and didn't get a viable answer before. 'Trying again.
Example: If 5 / 0 -( "0" is second number), A divide by zero error warning would be included in the script.
Script:
echo "Enter a number."
read num1
echo "Enter another number."
read num2
div=$((num1 / num2))
echo "div=$div"