[GRASS-user] Editing a bash script
Rebecca Bennett
rabennett at ymail.com
Thu Mar 17 13:55:30 EDT 2011
Hello all,
I have been having a go at upgrading a basic bash script that I made to run a
series of commands in GRASS. I would like the script to ask the user for two
input files (one internal to the location i.e. an @PERMENANT and the other and
external .asc) and an prefix to the output files of the process.
So far I have tried this bit of script to enter the GRASS raster, but it fails
to prompt. All other commands (i.e. g.list rast) work fine.
g.list rast
g.findfile type=old elem=cell_misc prompt="Enter raster name "
unixfile=cur_raster
. cur_raster
if [ ! "$file" ]
then
exit
fi
RAST=${name}
Can anyone point out where I'm doing wrong and/or point me in the direction of
some more advanced tutorials and information for GRASS scripting than I have
found here http://grass.fbk.eu/gdp/grass5tutor/HTML_en/c1806.html
Many thanks for reading,
Rebecca
________________________________
From: Rich Shepard <rshepard at appl-ecosys.com>
To: grass-users at lists.osgeo.org
Sent: Thu, 17 March, 2011 16:53:56
Subject: Re: [GRASS-user] How To Identify db.copy Error?
On Thu, 17 Mar 2011, Micha Silver wrote:
> "Offset" is a postgres (SQL) reserved word. Can you change that column
> name in the dbf?
Yep. Emacs (of course!) works well. I changed it to setoff and postgres
is happy. I've a couple of other files that throw errors, but the issue is
not reserved words. Later today I'll go look for a dbf->csv filter. Then I
can clean the text file and copy it into postgres.
Thanks, Micha,
Rich
_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110317/6bc91d49/attachment.html
More information about the grass-user
mailing list