[GRASS-SVN] r55067 - grass-addons/grass6/vector/v.in.ply

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 14 16:19:13 PST 2013


Author: hamish
Date: 2013-02-14 16:19:13 -0800 (Thu, 14 Feb 2013)
New Revision: 55067

Modified:
   grass-addons/grass6/vector/v.in.ply/v.in.ply
Log:
quote variables, mention todo

Modified: grass-addons/grass6/vector/v.in.ply/v.in.ply
===================================================================
--- grass-addons/grass6/vector/v.in.ply/v.in.ply	2013-02-15 00:14:54 UTC (rev 55066)
+++ grass-addons/grass6/vector/v.in.ply/v.in.ply	2013-02-15 00:19:13 UTC (rev 55067)
@@ -68,6 +68,7 @@
 
 cat "$GIS_OPT_FILE" | awk "/ply/,/end_header/" > /dev/null
 DATALINES=`head -n 30 "$GIS_OPT_FILE" | grep 'element vertex' | cut -d' ' -f3`
+# TODO: test for valid number of lines here.
 
 head -n 30 "$GIS_OPT_FILE" | grep 'char red' > /dev/null 2>/dev/null
 if [ $? -eq 0 ] ; then
@@ -84,7 +85,7 @@
 fi
 
 if [ "$COLOR" -eq 0 ] ; then
-   tail -n $DATALINES "$GIS_OPT_FILE" | tr -s ' ' ' ' | \
+   tail -n "$DATALINES" "$GIS_OPT_FILE" | tr -s ' ' ' ' | \
       sed 's+^ ++g' | cut -d' ' -f1-3 | \
       v.in.ascii -z x=1 y=2 z=3 out=$MAP fs=" "
 
@@ -93,7 +94,7 @@
       exit 1
    fi
 else
-   tail -n $DATALINES "$GIS_OPT_FILE" | tr -s ' ' ' ' | \
+   tail -n "$DATALINES" "$GIS_OPT_FILE" | tr -s ' ' ' ' | \
       sed 's+^ ++g' | cut -d' ' -f1-7 | \
       awk -F " " '{printf "%f,%f,%f,%d:%d:%d,%d\n", $1, $2, $3, $4, $5, $6, $7}' | \
       v.in.ascii -z x=1 y=2 z=3 out=$MAP fs="," \



More information about the grass-commit mailing list