Shell aritmetic operations on the command lineFollow @ggarron
You can perform simple aritmetic operations on the Linux shell command line, without using any external program.
use the command
These are the aritmetic operations.
- Reminder of a divition
expr 1 + 2
expr 2 - 1
expr 2 \* 1
expr 2 / 1
expr 20 % 3
Note that for multiplication we escape the * character, with the back slash, and that the % operand gives as the reminder of a divition, also the divition is only giving as the Integer