[GRASSLIST:3491] Re: about writing a script program
James Cameron
quozl at us.netrek.org
Thu Apr 11 02:47:00 EDT 2002
On Wed, Apr 10, 2002 at 08:13:28PM -1000, Fengxian Fan wrote:
> 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?
Yes, it is possible.
> Can I do that using Perl or I have to use some other scripting
> language? Where (web page) can I get some instruction?
You can use whatever scripting language you like.
I'm not sure where there is a web page to help with this.
If you know the commands that you type to do something, type them into
a file using a text editor, and then use the . (dot) command to execute
the file.
Like this;
GRASS:~/gis > echo "d.mon start=x0" > start
GRASS:~/gis > echo "g.region -d" >> start
GRASS:~/gis > . start
I think it can also be done by tcltkgrass, but mine is no longer
starting, anyone have any ideas; [thread hijack, change subject]
GRASS:~/gis/old > tcltkgrass
Error in startup script: Warning: locale not supported by C library, locale unchanged
while executing
"exec xterm -geometry 40x5 -e d.mon start=$monitor"
(procedure "start_monitor" line 17)
invoked from within
"start_monitor $name"
(procedure "start_monitors" line 5)
invoked from within
"start_monitors"
(file "/usr/local/grass5/tcltkgrass/main/gui.tcl" line 1895)
invoked from within
"source $env(TCLTKGRASSBASE)/main/gui.tcl"
(file "/usr/local/grass5/bin/tcltkgrass" line 17)
--
James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/
More information about the grass-user
mailing list