August 1999
Intermediate to advanced
1000 pages
83h 9m
English
let "arg"... Use the let command to perform integer arithmetic as specified by one or more arguments. Each arg can contain numbers, operators, constants, and shell variables that define a separate arithmetic expression to be evaluated. Use double quotes with any arguments that contain spaces or other special characters. You can also use double parentheses ((...)) instead of double quotes for arguments that contain white space.
The exit status is 0 if the value of the last expression is non-zero, and 1 otherwise.
The following example sets the variable X to the sum of 1 + 1.
$ let "X=1 + 1" $ print $X 2 $
See ...
Read now
Unlock full access