[Swift-commit] r4421 - trunk/libexec/log-processing
wozniak at ci.uchicago.edu
wozniak at ci.uchicago.edu
Tue Apr 26 15:32:18 CDT 2011
Author: wozniak
Date: 2011-04-26 15:32:18 -0500 (Tue, 26 Apr 2011)
New Revision: 4421
Modified:
trunk/libexec/log-processing/extract-start-time
Log:
Simplify this script
Modified: trunk/libexec/log-processing/extract-start-time
===================================================================
--- trunk/libexec/log-processing/extract-start-time 2011-04-26 16:51:03 UTC (rev 4420)
+++ trunk/libexec/log-processing/extract-start-time 2011-04-26 20:32:18 UTC (rev 4421)
@@ -1,26 +1,16 @@
#!/bin/sh
-/bin/pwd 1>&2
+# Extract start time in unix time from original Swift log
-rm -f tmp-extract-starttime2
-
-if [[ $LOG == "" ]] ; then
+if [[ $LOG == "" ]] ; then
LOG=$1
fi
-if [ "X$LOG" != "X" ] ; then
- head $LOG | iso-to-secs >> tmp-extract-starttime2
-else
- echo "No LOG given!"
+if [ "X$LOG" == "X" ] ; then
+ echo "extract-start-time: no LOG given!" 1>&2
exit 1
fi
-# for e in *.event ; do
-# head -n 1 $e >> tmp-extract-starttime2
-# done
+start=$( head $LOG | iso-to-secs | cut -f 1 -d ' ' | sort -n | head -1 )
-sort -n < tmp-extract-starttime2 >tmp-extract-starttime
-
-read st rest < tmp-extract-starttime
-
-echo $st
+echo $start
More information about the Swift-commit
mailing list