[GRASS-SVN] r34384 - grass/branches/develbranch_6/scripts/v.db.renamecol

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 19 04:13:43 EST 2008


Author: mlennert
Date: 2008-11-19 04:13:43 -0500 (Wed, 19 Nov 2008)
New Revision: 34384

Modified:
   grass/branches/develbranch_6/scripts/v.db.renamecol/v.db.renamecol
Log:
grep for column name as a word to avoid multiple grep results


Modified: grass/branches/develbranch_6/scripts/v.db.renamecol/v.db.renamecol
===================================================================
--- grass/branches/develbranch_6/scripts/v.db.renamecol/v.db.renamecol	2008-11-19 06:54:12 UTC (rev 34383)
+++ grass/branches/develbranch_6/scripts/v.db.renamecol/v.db.renamecol	2008-11-19 09:13:43 UTC (rev 34384)
@@ -143,8 +143,8 @@
 fi
 
 # describe old col
-oldcoltype="`db.describe -c table=$table database=$database driver=$driver | grep $oldcol | cut -d':' -f3`"
-oldcollength=`db.describe -c table=$table database=$database driver=$driver | grep $oldcol | cut -d':' -f4`
+oldcoltype="`db.describe -c table=$table database=$database driver=$driver | grep -w "$oldcol" | cut -d':' -f3`"
+oldcollength=`db.describe -c table=$table database=$database driver=$driver | grep -w "$oldcol" | cut -d':' -f4`
 
 # some tricks
 if [ "$driver" = "sqlite" -o "$driver" = "dbf" ] ; then



More information about the grass-commit mailing list