[GRASS-SVN] r53931 - grass-promo/tutorials/batch_processing/earthquakes/NZ

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 19 15:31:27 PST 2012


Author: hamish
Date: 2012-11-19 15:31:27 -0800 (Mon, 19 Nov 2012)
New Revision: 53931

Modified:
   grass-promo/tutorials/batch_processing/earthquakes/NZ/do_quakes_NZTM_ChCh.sh
   grass-promo/tutorials/batch_processing/earthquakes/NZ/do_quakes_NZ_lcc.sh
Log:
newest data now comes at start of datastream, not end

Modified: grass-promo/tutorials/batch_processing/earthquakes/NZ/do_quakes_NZTM_ChCh.sh
===================================================================
--- grass-promo/tutorials/batch_processing/earthquakes/NZ/do_quakes_NZTM_ChCh.sh	2012-11-19 23:13:10 UTC (rev 53930)
+++ grass-promo/tutorials/batch_processing/earthquakes/NZ/do_quakes_NZTM_ChCh.sh	2012-11-19 23:31:27 UTC (rev 53931)
@@ -114,7 +114,7 @@
 
 
 # get the timestamp
-YMD=`tail -n 1 "$DATAFILE"  | cut -f1 -d'|'`
+YMD=`head -n 2 "$DATAFILE" | tail -n 1 | cut -f1 -d'|'`
 if [ `echo "$YMD" | wc -c` -ne 11 ] ; then
     echo "Bad timestamp ($YMD). Using system date instead." >&2
     YMD=`date +%Y/%m/%d`

Modified: grass-promo/tutorials/batch_processing/earthquakes/NZ/do_quakes_NZ_lcc.sh
===================================================================
--- grass-promo/tutorials/batch_processing/earthquakes/NZ/do_quakes_NZ_lcc.sh	2012-11-19 23:13:10 UTC (rev 53930)
+++ grass-promo/tutorials/batch_processing/earthquakes/NZ/do_quakes_NZ_lcc.sh	2012-11-19 23:31:27 UTC (rev 53931)
@@ -111,7 +111,7 @@
 
 
 # get the timestamp
-YMD=`tail -n 1 "$DATAFILE"  | cut -f1 -d'|'`
+YMD=`head -n 2 "$DATAFILE" | tail -n 1 | cut -f1 -d'|'`
 if [ `echo "$YMD" | wc -c` -ne 11 ] ; then
     echo "Bad timestamp ($YMD). Using system date instead." >&2
     YMD=`date +%Y/%m/%d`



More information about the grass-commit mailing list