[GRASS-user] Script fails; manual entry works

Rich Shepard rshepard at appl-ecosys.com
Wed Sep 18 13:22:22 PDT 2019

I've a script that begins this way:


# Create projection and exit
# LDQ-45123G3:
grass79 -c LDQ-45123G3/2009_OLC_Hood\ to\ Coast/Bare_Earth/be45123g3/prj.adf /data/grassdata/g3 -e

grass79 g3/PERMANENT
sleep 1s
r.in.gdal in=LDQ-45123G3/2009_OLC_Hood\ to\ Coast/Bare_Earth/be45123g3/hdr.adf out=45123g3_hood_to_coast mem=16000 --o
r.import in=LDQ-45123G3/2009_OLC_Hood\ to\ Coast/Bare_Earth/be45123g3h/hdr.adf out=45123g3h_hood_to_coast resamp=lanczos_f mem=16000 --o
r.import in=LDQ-45123G3/2009_OLC_Willamette\ Valley/Bare_Earth/be45123g3/hdr.adf out=45123g3_willamette_valley resamp=lanczos_f mem=16000 --o
r.import in=LDQ-45123G3/2009_OLC_North\ Coast/Bare_Earth/be45123g3/hdr.adf out=45123g3_north_coast resamp=lanczos_f mem=16000 --o
r.import in=LDQ-45123G3/2015_ODF_NW\ Oregon-McGregor/Bare_Earth/be45123g3/hdr.adf out=45123g3_oregon_mcgregor resamp=lanczos_f mem=16000 --o

When I run the script, and kill it after a minute or so this is the console

GRASS 7.9.dev (g3):/data/grassdata > exit
Cleaning up temporary files...

Goodbye from GRASS GIS

./process-lidar-dems-row-g.sh: line 12: r.in.gdal: command not found
./process-lidar-dems-row-g.sh: line 13: r.import: command not found
./process-lidar-dems-row-g.sh: line 14: r.import: command not found
./process-lidar-dems-row-g.sh: line 15: r.import: command not found
./process-lidar-dems-row-g.sh: line 16: r.import: command not found

However, when I block each of the first 4 lines in the script (other than
the sleep command) grass processes r.in.gdal andr.import without throwing
the 'command not found' error.

What have I done incorrectly which breaks the script at line 9 (I've
redacted a few lines in this version)?



More information about the grass-user mailing list