7.5. Arithmetic ExpressionsThe let command performs integer arithmetic. bash provides a way to substitute integer values (for use as command arguments or in variables); base conversion is also possible:
7.5.1. Operatorsbash uses arithmetic operators from the C programming language; the following list is in decreasing order of precedence. Use parentheses to override precedence.
7.5.2. ExamplesSee the let built-in command for more information and examples. let "count=0" "i = i + 1" Assign i and count let "num % 2" Test for an even number Copyright © 2001 O'Reilly & Associates. All rights reserved. |
|