1 |
On Sun, 2007-10-07 at 01:09 -0400, Mike Frysinger wrote: |
2 |
> On Tuesday 02 October 2007, George Shapovalov wrote: |
3 |
> > Tuesday, 2. October 2007, Roy Marples Ви написали: |
4 |
> > > And here it is |
5 |
> > |
6 |
> > - if [[ "${FORTRANC}" = "gfortran" ]]; then |
7 |
> > + if [ "${FORTRANC}" = "gfortran" ]; then |
8 |
> > |
9 |
> > You know, it is funny to see these lines after all those cries about how [ |
10 |
> > is evil and we should really never ever use it but rather always use [[ |
11 |
> > form :). |
12 |
> > |
13 |
> > Oh, btw, does the compliant sh correctly process the most cited |
14 |
> > composition? : [ -n $foo ] && [ -z $foo ] && echo "huh?" |
15 |
> > (straight from devmanual, the primary reason why [ is considered bad) |
16 |
> |
17 |
> [...] will crap a brick if foo expands to multiple arguments |
18 |
|
19 |
Only if unquoted. |
20 |
|
21 |
> which is why |
22 |
> [[...]] is preferred ... it'll do the sane thing and work correctly |
23 |
|
24 |
Which encourages developers not to quote in my view. |
25 |
|
26 |
Roy |
27 |
|
28 |
-- |
29 |
gentoo-dev@g.o mailing list |