[GRASS-user] running grass64-svn scripts in sh (OSX)

Markus Neteler neteler at osgeo.org
Fri Jul 10 09:03:49 EDT 2009


On Fri, Jul 10, 2009 at 3:13 AM, Jeff
Hamann<jeff.hamann at forestinformatics.com> wrote:
> It's been a few years since I've used GRASS, so please forgive my rust...
>
> I've created a simple shell script (grasstest.sh) that I need to run
> automatically, where the contents are:
>
> echo "attempting to generate classified image for " $1

This $1 will never been used and it may cause confusion. To
pass variables, please use environmental variables.

....
>
> Then following the instructions for running a grass64 script as a batch job
> (http://grass.osgeo.org/wiki/GRASS_and_Shell):
>
> $ export
> GRASS_BATCH_JOB=/Users/hamannj/Documents/rufus/trunk/bin/grasstest.sh
>
> then running grass64 from the command line:
>
> $ grass64 -text
> /Users/hamannj/Documents/rufus/trunk/incoming/drevil/PERMANENT
>
> results in the following output:
>
> rufus:bin hamannj$ grass64 -text
> /Users/hamannj/Documents/rufus/trunk/incoming/drevil/PERMANENT
> Cleaning up temporary files ...
> Starting GRASS ...
> Executing '/Users/hamannj/Documents/rufus/trunk/bin/grasstest.sh' ...
> Welcome to GRASS 6.4.0svn (2009)
> : command not foundments/rufus/trunk/bin/grasstest.sh: line 14:
> : command not foundments/rufus/trunk/bin/grasstest.sh: line 23:
> : command not foundments/rufus/trunk/bin/grasstest.sh: line 26:
> : command not foundments/rufus/trunk/bin/grasstest.sh: line 30:
...

It appears that you script you really used is longer than your example.
Is that possible?

Markus


More information about the grass-user mailing list