You can do mathematical operations only on integers (whole numbers) for all three shells. If you want to do more complicated arithmetic, use the awk or the bc command.
To perform mathematical operations in the Bourne shell, use the expr command. The expr command has the following syntax.
You must separate the mathematical operators (shown in Table 98) and the operand with white space.
The multiplication, division, and remainder operators have higher precedence than do the addition or subtraction operators. Use parentheses for grouping.