On Sunday 07 October 2007, Roy Marples wrote:
> On Sun, 2007-10-07 at 01:09 -0400, Mike Frysinger wrote:
> > On Tuesday 02 October 2007, George Shapovalov wrote:
> > > Tuesday, 2. October 2007, Roy Marples Ви написали:
> > > > And here it is
> > >
> > > -       if [[ "${FORTRANC}" = "gfortran" ]]; then
> > > +       if [ "${FORTRANC}" = "gfortran" ]; then
> > >
> > > You know, it is funny to see these lines after all those cries about
> > > how [ is evil and we should really never ever use it but rather always
> > > use [[ form :).
> > >
> > > Oh, btw, does the compliant sh correctly process the most cited
> > > composition? : [ -n $foo ] && [ -z $foo ] && echo "huh?"
> > > (straight from devmanual, the primary reason why [ is  considered bad)
> >
> > [...] will crap a brick if foo expands to multiple arguments
>
> Only if unquoted.
>
> >  which is why
> > [[...]] is preferred ... it'll do the sane thing and work correctly
>
> Which encourages developers not to quote in my view.

addressing one issue (quoting) while ignoring others (extended syntax) leads 
to crappy inconsistencies.  if the standard you want (POSIX) cant do it all, 
then nitpicking details is a waste of time.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to