( expr )
Returns the value of expr. This may be used to override the normal precedence of operators. expr1 -a expr2
True if both expr1 and expr2 are true. expr1 -o expr2
True if either expr1 or expr2 is true.
The test and [ builtins evaluate conditional expressions using a set of rules based on the number of arguments.
0 arguments
The expression is false.
1 argument
The expression is true if and only if the argument is not null.
2 arguments
If the first argument is ‘!’, the expression is true if and only if the second argument is null. If the first argument is one of the unary conditional operators (see Section 6.4 [Bash Conditional Expres- sions], page 85), the expression is true if the unary test is true. If the first argument is not a valid unary operator, the expression is false.
3 arguments
The following conditions are applied in the order listed.
If the second argument is one of the binary conditional operators (see
Section 6.4 [Bash Conditional Expressions], page 85), the result of the expression is the result of the binary test using the first and third arguments as operands. The ‘-a’ and ‘-o’ operators are considered binary operators when there are three arguments. If the first argument is ‘!’, the value is the negation of the two-argument test using the second and third arguments. If the first argument is exactly ‘(’ and the third argument is exactly ‘)’, the result is the one-argument test of the second argument.
Otherwise, the expression is false.
4 arguments
If the first argument is ‘!’, the result is the negation of the three- argument expression composed of the remaining arguments. Oth- erwise, the expression is parsed and evaluated according to prece- dence using the rules listed above.
5 or more arguments
The expression is parsed and evaluated according to precedence using the rules listed above.
When used with test or ‘[’, the ‘<’ and ‘>’ operators sort lexicographically using ASCII ordering. times