[GRASSLIST:3493] Re: about writing a script program

marino vetuschi zuccolini zucco at dipteris.unige.it
Thu Apr 11 04:28:34 EDT 2002


Hi to all,
I don't know if this is useful for you but i've some Grass command 
nested in bash script procedure like that:

#!/bin/bash
...
$GRASS_ETC/run $GRASS_BIN/g.remove rast=MASK
$GRASS_ETC/run $GRASS_BIN/g.copy rast=mask_grid,MASK
...
$GRASS_ETC/run $GRASS_BIN/g.region n=${bound_4} s=${bound_3} 
e=${bound_2} w=${bound_1} nsres=${nsres} ewres=${ewres}
...
where for my suite is

$GRASS_ETC=/usr/local/grass5/etc
$GRASS_BIN=$GRASS_ETC/bin/cmd

NOTE: for some grass programs like v.build.polylines you have to 
recompile declaring exactly the path of v.support and v.in.ascii in 
main.c

m.

>Hi,
>
>    I used some commands in GRASS to analyse the data and got some
>resultant maps. Is it possible to write a script program including those
>commands I want to use, then execute the program to generate the resultant
>map automatically?
>    Can I do that using Perl or I have to use some other scripting
>language?  Where (web page) can I get some instruction?
>    Thank you for your consideration and help.
>
>
>Fengxian Fan
>University of Hawaii at Manoa


-- 
#########################
Marino Vetuschi Zuccolini
DIPTERIS -Univ. Genova
Corso Europa 26, 16132
++ 39 010 3538136
http://ugo.dipteris.unige.it
#########################



More information about the grass-user mailing list