Korn Shell: Unix and Linux Programming Manual, Third Edition, The By Anatole Olczak
Table of Contents
The let Command
The ((...)) Command
Declaring Integer Variables
Arithmetic Constants
Arithmetic Operators
Random Numbers
The Korn shell provides the ability to perform integer arithmetic in any base from two to thirty-six using built-in commands. It executes much faster than using the expr command, since it doesn't have to start another process. It can also be used instead of the test command for integer comparisons. In addition, all of the operators from the C programming language (except ++, , and ?:) are now supported by the Korn shell.