Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-18 Thread Nikos Alexandris
On Tue, 2008-11-18 at 17:07 -0800, Dylan Beaudette wrote: > On Tuesday 18 November 2008, Nikos Alexandris wrote: > > On Tue, 2008-11-18 at 15:12 +0100, Nikos Alexandris wrote: > > > On Sat, 2008-11-15 at 23:53 -0800, Hamish wrote: [...] > > > > > > Hamish, > > > sorry for not following up. I've tri

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-18 Thread Dylan Beaudette
On Tuesday 18 November 2008, Nikos Alexandris wrote: > On Tue, 2008-11-18 at 15:12 +0100, Nikos Alexandris wrote: > > On Sat, 2008-11-15 at 23:53 -0800, Hamish wrote: > > > Hi, > > > > > > I haven't really been following this thread (or know much about it), > > > but I spotted this tip on the gdal

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-18 Thread Nikos Alexandris
On Tue, 2008-11-18 at 15:12 +0100, Nikos Alexandris wrote: > On Sat, 2008-11-15 at 23:53 -0800, Hamish wrote: > > Hi, > > > > I haven't really been following this thread (or know much about it), but > > I spotted this tip on the gdal site, maybe it helps: > > > > http://www.gdal.org/ogr/drv_gpx.h

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-18 Thread Nikos Alexandris
On Sat, 2008-11-15 at 23:53 -0800, Hamish wrote: > Hi, > > I haven't really been following this thread (or know much about it), but > I spotted this tip on the gdal site, maybe it helps: > > http://www.gdal.org/ogr/drv_gpx.html > # Use of -sql option to remap field names to the ones allowed by th

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-15 Thread Hamish
Hi, I haven't really been following this thread (or know much about it), but I spotted this tip on the gdal site, maybe it helps: http://www.gdal.org/ogr/drv_gpx.html # Use of -sql option to remap field names to the ones allowed by the GPX schema ! ogr2ogr -f GPX output.gpx input.shp -sql "SELE

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-13 Thread Nikos Alexandris
On Thu, 2008-11-13 at 10:28 +0100, Moritz Lennert wrote: > On 07/11/08 01:47, Nikos Alexandris wrote: > > On Fri, 2008-11-07 at 01:38 +0100, Moritz Lennert wrote: [...] > Sorry, for not coming back on this earlier, but I think I found it now. > The error (which also appears in other drivers, at l

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-13 Thread Moritz Lennert
On 07/11/08 01:47, Nikos Alexandris wrote: On Fri, 2008-11-07 at 01:38 +0100, Moritz Lennert wrote: You still use quotes: tempcolumn="$tempcolumn\_tmp" IIUC, the quotes will let the slash appear literally. So, just leave out the quotes as follows: tempcolumn=$tempcolumn\_tmp However, as you

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-07 Thread Nikos Alexandris
On Fri, 2008-11-07 at 06:39 +, Glynn Clements wrote: > Moritz Lennert wrote: [...] > > You still use quotes: > > tempcolumn="$tempcolumn\_tmp" > > > > IIUC, the quotes will let the slash appear literally. So, just leave out > > the quotes as follows: > > > > tempcolumn=$tempcolumn\_tmp > >

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-06 Thread Glynn Clements
Moritz Lennert wrote: > >> I think this is because of the quotes: > >> > >> tempcolumn="$tempcolumn""\_tmp" > >> > >> But actually, trying out your entire original script, I don't see > >> where > >> the problem is. The attached version seems to work perfectly for me > >> (just slightly simplif

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-06 Thread Nikos Alexandris
On Fri, 2008-11-07 at 01:38 +0100, Moritz Lennert wrote: > You still use quotes: > tempcolumn="$tempcolumn\_tmp" > > IIUC, the quotes will let the slash appear literally. So, just leave > out > the quotes as follows: > > tempcolumn=$tempcolumn\_tmp > > However, as you say your original script (

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-06 Thread Moritz Lennert
On 06/11/08 20:33, Nikos Alexandris wrote: On Thu, 2008-11-06 at 19:59 +0100, Moritz Lennert wrote: [...] # output block_id\_tmp I think this is because of the quotes: tempcolumn="$tempcolumn""\_tmp" But actually, trying out your entire original script, I don't see where the problem is. Th

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-06 Thread Nikos Alexandris
On Thu, 2008-11-06 at 19:59 +0100, Moritz Lennert wrote: > [...] > > > > > # output > > block_id\_tmp > > I think this is because of the quotes: > > tempcolumn="$tempcolumn""\_tmp" > > But actually, trying out your entire original script, I don't see > where > the problem is. The attached ver

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-06 Thread Moritz Lennert
On 06/11/08 17:37, Nikos Alexandris wrote: On Thu, 2008-11-06 at 11:18 +0100, Paolo Craveri wrote: ciao to all pay attention to spaces between column name in v.db.renamecol: no spaces before and after comma. Command substitution: backticks → $() not substantial differences; the second for

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-06 Thread Nikos Alexandris
On Thu, 2008-11-06 at 11:18 +0100, Paolo Craveri wrote: > ciao to all > > pay attention to spaces between column name in v.db.renamecol: no > spaces before and after comma. > > Command substitution: backticks → $() not substantial > differences; the second form is easier to read and write; i

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-06 Thread Paolo Craveri
ciao to all pay attention to spaces between column name in v.db.renamecol: no spaces before and after comma. Command substitution: backticks → $() not substantial differences; the second form is easier to read and write; it is also nestable (we are all used to `` form, but $() is better

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-05 Thread Moritz Lennert
On 05/11/08 19:36, Nikos Alexandris wrote: On Wed, 2008-11-05 at 17:33 +0100, Moritz Lennert wrote: On 05/11/08 15:17, Nikos Alexandris wrote: On Tue, 2008-11-04 at 10:35 +0100, Paolo Craveri wrote: Hello Nikos The command v.db.renamecol map=test_rencol column="AREA","area" does not work. I

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-05 Thread Nikos Alexandris
On Wed, 2008-11-05 at 19:51 +0100, Nikos Alexandris wrote: > On Wed, 2008-11-05 at 19:36 +0100, Nikos Alexandris wrote: > > On Wed, 2008-11-05 at 17:33 +0100, Moritz Lennert wrote: > > > On 05/11/08 15:17, Nikos Alexandris wrote: > > > > On Tue, 2008-11-04 at 10:35 +0100, Paolo Craveri wrote: > [..

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-05 Thread Nikos Alexandris
On Wed, 2008-11-05 at 19:36 +0100, Nikos Alexandris wrote: > On Wed, 2008-11-05 at 17:33 +0100, Moritz Lennert wrote: > > On 05/11/08 15:17, Nikos Alexandris wrote: > > > On Tue, 2008-11-04 at 10:35 +0100, Paolo Craveri wrote: [...] I tried another example using "cut" this time. #!/bin/sh C

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-05 Thread Nikos Alexandris
On Wed, 2008-11-05 at 17:33 +0100, Moritz Lennert wrote: > On 05/11/08 15:17, Nikos Alexandris wrote: > > On Tue, 2008-11-04 at 10:35 +0100, Paolo Craveri wrote: > >> Hello Nikos > >> > >>> The command > >>> v.db.renamecol map=test_rencol column="AREA","area" > >>> > >>> does not work. I assume tha

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-05 Thread Moritz Lennert
On 05/11/08 15:17, Nikos Alexandris wrote: On Tue, 2008-11-04 at 10:35 +0100, Paolo Craveri wrote: Hello Nikos The command v.db.renamecol map=test_rencol column="AREA","area" does not work. I assume that trying to use 'tr' for example wouldn't help (?). Or am I doing something wrong? Try t

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-05 Thread Nikos Alexandris
On Tue, 2008-11-04 at 10:35 +0100, Paolo Craveri wrote: > Hello Nikos > > > The command > > v.db.renamecol map=test_rencol column="AREA","area" > > > > does not work. I assume that trying to use 'tr' for example wouldn't > > help (?). Or am I doing something wrong? > > > > > Try this: > > > ==

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-04 Thread Paolo Craveri
Hello Nikos > The command > v.db.renamecol map=test_rencol column="AREA","area" > > does not work. I assume that trying to use 'tr' for example wouldn't > help (?). Or am I doing something wrong? > Try this: == #!/bin/sh # # # in this example I use nc_spm_07 dataset # # # I created

Re: [GRASS-user] Rename multiple sqlite columns at once

2008-11-03 Thread Nikos Alexandris
On Mon, 2008-11-03 at 16:58 +0100, Nikos Alexandris wrote: > Is there (hopefully?) any way to translate for example all Caps to lower > case letters in all column names of a vector maps attribute tavble > (stored in sqlite.db)? > > Any way to apply similar techniques like with common GNU text util

[GRASS-user] Rename multiple sqlite columns at once

2008-11-03 Thread Nikos Alexandris
Is there (hopefully?) any way to translate for example all Caps to lower case letters in all column names of a vector maps attribute tavble (stored in sqlite.db)? Any way to apply similar techniques like with common GNU text utilities (i.e. tr, sed, cut)? Kind regards, Nikos