5.4 ExpressionsExpressions are used in @ , if , and while statements to perform arithmetic, string comparisons, file testing, etc. exit and set can also specify expressions. Expressions are formed by combining variables and constants with operators that resemble those in the C programming language. Operator precedence is the same as in C but can be remembered as follows:
Group all other expressions inside ( )'s. Parentheses are required if the expression contains <, >, &, or |. 5.4.1 OperatorsOperators can be one of the following types: 5.4.1.1 Assignment Operators
5.4.1.2 Arithmetic Operators
5.4.1.3 Bitwise and Logical Operators
5.4.1.4 Comparison Operators
5.4.1.5 File Inquiry Operators
Command substitution and filename expansion are performed on
5.4.2 ExamplesThe following examples show @ commands and assume n = 4:
The following examples show the first line of if or while statements:
|
|