On Tue, Aug 3, 2010 at 12:21 PM, Markus Metz <[email protected]> wrote: > 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
Find attached a post-patch to reach the desired output as needed for "eval". I have locally backported it to 6.4, too. But pls review the patch first. Markus
v.db.connect_g7.diff
Description: Binary data
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
