1 |
On 08:58 Mon 01 Oct , Alin Năstac wrote: |
2 |
> According to bash manual, && has a greater precedence than ||. That |
3 |
> would translate in: |
4 |
|
5 |
Where'd you see that? Here's my man page: |
6 |
|
7 |
A list is a sequence of one or more pipelines separated by one of the |
8 |
operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or |
9 |
<newline>. |
10 |
|
11 |
Of these list operators, && and || have equal precedence, followed by ; |
12 |
and &, which have equal precedence. |
13 |
|
14 |
Oh, now I see. You're reading about precedence in [[ ]] blocks, which |
15 |
aren't being used here. |
16 |
|
17 |
[[ expression ]] |
18 |
|
19 |
... |
20 |
|
21 |
Expressions may be combined using the following operators, |
22 |
listed in decreasing order of precedence: |
23 |
|
24 |
( expression ) |
25 |
Returns the value of expression. This may be used to |
26 |
override the normal precedence of operators. |
27 |
! expression |
28 |
True if expression is false. |
29 |
expression1 && expression2 |
30 |
True if both expression1 and expression2 are true. |
31 |
expression1 || expression2 |
32 |
True if either expression1 or expression2 is true. |
33 |
|
34 |
Thanks, |
35 |
Donnie |
36 |
-- |
37 |
gentoo-dev@g.o mailing list |