[GRASS-user] v.db.connect -p
Markus Metz
markus.metz.giswork at googlemail.com
Tue Aug 3 06:21:03 EDT 2010
Markus Neteler wrote:
> Patricio Toledo wrote:
>> Dear GRASS Developers
>>
>> This is a petition:
>>
>> Is it possible to add a option to v.db.connect (like g.region -p) so
>> the output will be somelike:
>>
>> $ v.db.connect -p map=test layer=2
>> driver=dbf
>> database=/the/database
>> table=thetable
>> column=thecolumn
>> layer=2
>>
>> i know -p actually does something very similar but this -p output is very useful
>> in g.region, so one can do inside a shell-script:
>>
>> $eval `v.db.connect -p map=test`
>>
>> to recover database connection parameters.
>
> There is -g
> -g Print all map connection parameters and exit in shell script style
> Format: layer[/layer name] table key database driver
> but it doesn't work as advertised (it is not shell script style!):
>
> v.db.connect -g map=streets_wake
> 1 streets_wake cat /home/neteler/grassdata/nc_spm_08/PERMANENT/dbf/ dbf
>
> even with fs="=" it makes a mess:
> v.db.connect -g map=streets_wake fs="="
> 1=streets_wake=cat=/home/neteler/grassdata/nc_spm_08/PERMANENT/dbf/=dbf
>
> Essentially, the line breaks are missing.
> Should be a simple thing to fix.
>
try trunk r42980
Markus M
More information about the grass-user
mailing list