home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeBook TitleSearch this book

4.4. Arithmetic Expressions

The Korn shell's let command performs arithmetic. ksh88 is restricted to integer arithmetic. ksh93 can do floating-point arithmetic as well. The Korn shell provides a way to substitute arithmetic values (for use as command arguments or in variables); base conversion is also possible:

$(( expr ))

Use the value of the enclosed arithmetic expression.

B#n

Interpret integer n in numeric base B. For example, 8#100 specifies the octal equivalent of decimal 64.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.