[GRASS-user] bash script error

Rebecca Bennett rabennett at ymail.com
Mon Aug 22 05:26:15 EDT 2011


Dear bash scripters,

I  would like to create the following r.mapcalc command calling a map in a script in GRASS 6.4.1 (Ubuntu 10.4):

g.ask type=old prompt="enter DTM" elem=cell_misc unixfile=/home/becca/Documents/grassdata/scripts/settings
. /home/becca/Documents/grassdata/scripts/settings
if [ ! "$file" ]
    then
        exit
fi

MAP=${fullname}
BKG=${name}_bkg

r.mapcalc '${BKG} = if(isnull(modern_mask at Brovey),${MAP},0)'

but it ends with the error

Invalid map <${MAP}>

Can
 anyone tell me how I should include calls to the map and name a 
derivative using the original raster name? I have used this syntax with 
success before so have not be able to troubleshoot this.

Thanks for reading,

Rebecca Bennett



More information about the grass-user mailing list