[GRASS-dev] some backports to 6.3.0-CVS branch

Glynn Clements glynn at gclements.plus.com
Fri Oct 26 17:39:29 EDT 2007


Markus Neteler wrote:

> >> What happens if you enter the following directly into the shell?
> >>
> >>       if [ "" != "" ] ; then  for dir in  ; do  make -C $dir clean ;  done ;  fi
> >>
> >>     
> >
> > sh: syntax error near unexpected token `;'
> >
> >   
> 
> In that rule the list is empty:
> 
> ... for dir in WHAT?;...
> 
> Isn't that the problem?

Yes. But that statement is conditionalised upon:

	if [ "" != "" ] ; then ...

The empty string *is* equal to itself, so the test should fail, and
there's no need to execute the command.

Note that the error is ignored, so it doesn't have any effect other
than adding some noise.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list