Math using bash capabilities

suggest change

Arithmetic can also be done without calling another program:

Multiplication:

echo $((5 * 2))
10

Division (integer division; the fractional part is discarded):

echo $((5 / 2))
2

Modulo:

echo $((5 % 2))
1

Exponentiation:

echo $((5 ** 2))
25

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents