March 2002
Beginner
504 pages
10h 47m
English
The general format for integer variable assignment is as follows:
let "VARIABLE=integer_expresson"
To embed integer calculations within a command, you can use the following syntax:
$((integer_expression))
The integer operators are used to perform simple arithmetic operations on integer values. The following list (order from highest to lowest operator precedence) describes the integer operators supported in ksh, bash and zsh. The logical operators described in this list return 1 for true and 0 for false.
| - | unary minus (negates the following value) |
| ! ~ | logical NOT, binary one's complement |
| * / % | multiply, divide, modulus (remainder operation) |
| + - | add, subtract |
| >> |
Read now
Unlock full access