[GRASS-user] split adjacent categories
Patton, Eric
epatton at nrcan.gc.ca
Thu Jan 10 14:00:16 EST 2008
>while [ $COUNTER < $max ]; do
> echo The counter is $COUNTER
>
> r.mapcalc "t1 = if(rast_in == $COUNTER,1,null())"
> r.buffer input=t1 output=b.$COUNTER distance=500
>
> let COUNTER=COUNTER+1
>
> done
>
>but failed because COUNTER was not recognized and I don't know at all, if
>these bash statements work at all using GRASS.
>
>I welcome any other idea.
Shouldn't your bash variables be quoted within the loop?
while [ "$COUNTER" -lt "$MAX" ] ; do
Similarly for the let statement:
let "COUNTER=COUNTER+1"
?
~ Eric.
More information about the grass-user
mailing list