5.4 ExpressionsExpressions are used in @ (the C shell math operator), 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. It is easiest to just remember the following precedence rules:
5.4.1 OperatorsOperators can be one of the following types. 5.4.1.1 Assignment operators5.4.1.2 Arithmetic operators
5.4.1.3 Bitwise and logical operators5.4.1.4 Comparison operators5.4.1.5 File inquiry operatorsCommand substitution and filename expansion are performed on file before the test is performed.
5.4.2 ExamplesThe following examples show @
commands and assume
The following examples show the first line of if or while statements.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|