[GRASS-user] run commands sequentially - help please
Glynn Clements
glynn at gclements.plus.com
Thu Aug 3 17:49:27 EDT 2006
Scott Mitchell wrote:
> > BTW I remember Markus showing us a way to save commands you type to
> > the GRASS CLI into a script (think is was X.save where
> > X=something).. this is good if you want to perform it once in
> > geenral and then edit the script for variations. Couldn't find it
> > off hand in the docs.
I suspect that was referring to the d.save command, which generates a
script which will re-create the contents of the current monitor.
> If you're using the command line, then you're just using a UNIX
> shell, customized to be able to run the GRASS modules. UNIX shells
> tend to have their own history mechanisms, so we just take advantage
> of that. If I remember correctly, the GRASS startup fires up the
> bash shell, and manipulates this to store the history during GRASS
> sessions into the mapset directory (in a .bash_history file).
The startup script starts the shell specified by $SHELL (i.e. the
user's default shell). The trick of setting HOME to the mapset
directory is only performed for certain well-known shells (csh/tcsh
and bash), as it needs to know how to modify the shell's startup
scripts to set HOME back to the user's home directory afterwards.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list