[GRASSLIST:2094] Re: GRASS and r.reclass in a batch errors

javier garcia - CEBAS rn001 at cebas.csic.es
Fri Dec 19 04:46:46 EST 2003


Hi Hamish and Glynn,

Now it works wonderfully!

The problem were the non-breaking space characters

I think I should learn bash

Thanks, and best regards

Javier
--------------------------------------------------------------------------
El Jue 18 Dic 2003 22:22, Glynn Clements escribió:
> javier garcia - CEBAS wrote:
> > I'm sorry, Hamish. This still does an error. I even have commented nearly
> > everything to find out the source of the error. But even doing it for a
> > single map  gives an error:
> > ----------------------------
> > #!/bin/bash
> > # \240reclass script
> > # i=1
> > # while [ $i -le 25 ] ; do
> > r.reclass input=imagen1end output=imarec1end << EOF
> > \240 \240 \240 \240253 = 192
> > \240 \240 \240 \240252 = 96
> > \240 \240 \240 \240251 = 48
> > \240 \240 \240 \240250 = 24
> > \240 \240 \240 \240249 = 12
> > \240 \240 \240 \240221 = 8
> > \240 \240 \240 \240193 = 7
> > \240 \240 \240 \240165 = 6
> > \240 \240 \240 \240133 = 4
> > \240 \240 \240 \240102 = 3
> > \240 \240 \240 \24070 = 2
> > \240 \240 \240 \24039 = 1
> > \240 \240 \240 \240* = NULL
> > \240 \240 \240 \240end
> > EOF
>
> The problem is that you have non-breaking space characters (octal 240,
> decimal 160) in the script, which r.reclass won't understand. These
> characters are shown as \240 above.
>
> Those characters probably look like spaces in a text editor, but won't
> be treated as such by many programs (including r.reclass). You need to
> change them to spaces or remove them.




More information about the grass-user mailing list