1 |
Mike Gilbert wrote: |
2 |
> > [] is shorthand for test. Both test and [[]] in my man bash read: |
3 |
> > |
4 |
> > --8<-- |
5 |
> > Expressions are composed of the primaries described .. under |
6 |
> > CONDITIONAL EXPRESSIONS. |
7 |
> > -->8-- |
8 |
|
9 |
And the next sentence is exactly what you wrote. :) |
10 |
|
11 |
"Word splitting and pathname expansion are not performed on the words |
12 |
between the [[ and ]]" |
13 |
|
14 |
|
15 |
> Word splitting does not occur within double brackets. This is |
16 |
> documented in the bash manual. |
17 |
> |
18 |
> http://www.gnu.org/software/bash/manual/bashref.html#Conditional-Constructs |
19 |
> |
20 |
> This causes empty output from a command substitution within double |
21 |
> brackets to be treated as a zero-length string. |
22 |
|
23 |
Thanks for pointing me to the right place! |
24 |
|
25 |
|
26 |
//Peter |