[GRASS-dev] Re: [GRASS-SVN] r30420 - grass/trunk/scripts/v.db.renamecol

Maciej Sieczka tutey at o2.pl
Mon Mar 3 07:52:43 EST 2008

Markus Neteler pisze:
> On Mon, Mar 3, 2008 at 11:53 AM, Maciej Sieczka <tutey at o2.pl> wrote:
>>>> Markus wrote:
>>> Maciek wrote:
>>  Hamish pisze:

>>> 'wc -c filename' will produce output like: '17 filename' (needing awk
>>> or cut) while 'wc -c < filename' or 'cat filename | wc -c' will produce
>>> output like: '17'. Maybe that is the dark memory?

>>  That could explain the " awk '{print $1}' ". Markus?

> Possibly yes. As said: darkly remembered...

>> In the end, v.db.renamcol without awk is as
>>  fast as it was with awk.

> At this point I don't see why do this effort.
> There is the risk to introduce new bugs

Well yes there is as always.

> (as seen here)

My awk to cut switch didn't introduce any bugs. No any new bugs were 
introduced at all. The only controversial change was:

- g.message -e 'User break!'
+ g.message -e "User break!"

which could (as Hamish says) but unlikely (as Ivan says) cause shell to 
expand the exclamation mark. Anyway - I reverted that, as single quotes 
are 100% safe. Glad Hamish pointed it out to me and sorry again.

Let me remind that the main point of my patches for v.db.renamecol and 
v.db.dropcol was to correct a bug that the key column was always assumed 
to be "cat". Fixed that. Other changes were BTW.

 > and there is no point in saving 7% of 10 nanoseconds.

There is no speed gain at all.

> Since awk is needed in GRASS it can also be used here.
> Why not using efforts for more important things?

Like I said, awk to cut change that was just done BTW fixing bugs.


More information about the grass-dev mailing list