[GRASS-user] problem with script started form directory differend
than home
Glynn Clements
glynn at gclements.plus.com
Wed Jul 23 07:35:05 EDT 2008
Jarekj wrote:
> in the script, which is started from ~/grass/rzeki/
> I have the problem with line
> ....
> v.db.connect -o map='red_'$k driver=dbf
> database=~/$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
The '~/' at the front of the path shouldn't be there.
Also, you need quote the argument; the DBF driver performs run-time
substitutions of GRASS variables. Without quoting, the shell will try
to expand them, and they aren't defined. IOW:
'database=$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
Note: you need to use single quotes, as the shell will expand
variables inside double quotes.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list