[GRASS-dev] gis.m in wingrass: using where clause in d.vect
causes error :can't read "_data(.gronsole.gronsole, 9,
donecmd)": no such element in array
Glynn Clements
glynn at gclements.plus.com
Mon Oct 9 06:54:02 EDT 2006
Moritz Lennert wrote:
> >>>> Using a where clause in vector display in gis.m causes the following
> >>>> error under WinGRASS. Any suggestions ?
> >>>> (WinGRASS version 2006-09-17)
> >>>>
> >>>> can't read "_data(.gronsole.gronsole,9,donecmd)": no such element in
> >>>> array can't read "_data(.gronsole.gronsole,9,donecmd)": no such
> >>>> element in array
> >>>> while executing
> >>>> "set donecmd $_data($path,$ci,donecmd)"
> >>>
> >>> also seen on Linux, GRASS versions 6.3 and 6.2-rc1 IF you put the
> >>> query in the "query cat values" box by mistake.
> >> I am not near a windows box right now, but I am quite positive that this
> >> is not the problem here. I entered the query in the where box, not the cat
> >> box.
> >>
> >> But I'll make sure tomorrow.
> >
> > Actually I just managed to test (Qemu over NX, quite an experience ;-) ),
> > and I can confirm that the problem is with the sql query box. So it is not
> > the same problem as the one described by Hamish.
>
> Huidae or Glynn, any ideas on this ?
# Actually run the program
if { $mingw == "1" } {
# shell scripts require sh.exe.
set cmd [concat | sh -c '$cmd']
} else {
set cmd [concat | $cmd 2>@ stdout]
}
If you want to use "sh -c ...", you have to escape any shell
metacharacters, otherwise commands which happen to contain shell
metacharacters (e.g. "<" or ">" in a SQL "WHERE" clause) won't work.
I've already explained this in the thread discussing these changes.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list