Math using bash capabilities
suggest changeArithmetic computation can be also done without involving any other programs like this:
Multiplication:
echo $((5 * 2))
10
Division:
echo $((5 / 2))
2
Modulo:
echo $((5 % 2))
1
Exponentiation:
echo $((5 ** 2))
25
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents