Numeric operations on Linux
Linux systems provide numerous ways to work with numbers on the command line – from doing calculations to using commands that generate a range of numbers. This post details some of the more helpful commands and how they work.The expr command One of the most commonly used commands for doing calculations on Linux is expr. This command lets you use your terminal window as a calculator and to write scripts that include calculations of various types. Here are some examples:$ expr 10 + 11 + 12 33 $ expr 99 - 102 -3 $ expr 7 \* 21 147 Notice that the multiplication symbol * in the command above requires a backslash to ensure the symbol isn’t interpreted as a wildcard. Here are some more examples:To read this article in full, please click here



