[GRASS-dev] GRASS 6.3.0

Glynn Clements glynn at gclements.plus.com
Sat Mar 15 02:32:31 EDT 2008

William Kyngesburye wrote:

> > As r.in.wms has been reported to work on Mac 10.5, I infer that the
> > #!/bin/bash used by r.tileset makes it use bash's internal echo (which
> > supports echo -n) instead of a system BSD /bin/echo which does not.  
> > (??)
> > Even if that is so, it's probably a good idea to fix anyway. The eval
> > within a function within another function and array quoting makes my  
> > head
> > hurt, so for clarity's sake I am leaning towards going with Paul's
> > suggestion of using GRASS's own $GISBASE/etc/echo there and keeping  
> > the
> > -n, versus Glynn's patch which I find hard to review beyond trial &  
> > error
> > tests which I can't properly do without OSX 10.5, which I don't have.
> >
> I was just comparing the 10.4 and 10.5 man pages for echo and bash -  
> ALL have the -n flag.  So really, it must be broken in 10.5's bash.   
> Or not?  Just to verify, on its own:
> echo -n "asdf"
> /bin/echo -n "asdf"
> both suppress the newline.  Strange.  Was it reported to not work in  
> r.tileset, or was it relation to another command?

r.tileset is totally dependent upon bash, so the "echo -n" issue
doesn't apply there.

Scripts which use #!/bin/sh have to allow for the possibility that
"echo" follows POSIX, which doesn't support -n (or, for that matter,
any switches at all).

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list