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

Maciej Sieczka tutey at o2.pl
Sun Mar 2 10:48:34 EST 2008


Markus Neteler pisze:
> On Sun, Mar 2, 2008 at 2:02 PM,  <svn_grass at osgeo.org> wrote:
>> Author: msieczka
>>  Date: 2008-03-02 08:02:33 -0500 (Sun, 02 Mar 2008)
>>  New Revision: 30420
>>
>>  Modified:
>>    grass/trunk/scripts/v.db.renamecol/v.db.renamecol
>>  Log:
>>  Fix: protect key column, allow renaming 'cat' when it isn't a key column.
>>  Get rid of awk dependency.
>>  Minor fixes.

> are you sure that this is portable?
> 
> if [ "$driver" = "dbf" ] ; then
> -  NAMELEN=`echo "$newcol" | wc -c | awk '{print $1}'`
> +  NAMELEN=`echo "$newcol" | wc -c`
> 
> I darkly remember that some "wc" programs insert odd spaces which
> would break the script.

I haven't heard of it. Maybe you are right. Let's ask on the dev ML. 
Thoughts, Anybody?

Maciek


More information about the grass-dev mailing list