"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.
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
“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.
On Thu, Mar 17, 2011 at 6:55 PM, Rebecca Bennett <rabennett@ymail.com> wrote:
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
On Thu, Mar 17, 2011 at 6:55 PM, Rebecca Bennett <rabennett@ymail.com> wrote:
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