[Swift-commit] r4346 - trunk/libexec/log-processing

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Tue Apr 12 14:37:04 CDT 2011


Author: wozniak
Date: 2011-04-12 14:37:04 -0500 (Tue, 12 Apr 2011)
New Revision: 4346

Modified:
   trunk/libexec/log-processing/sec-to-hour.pl
   trunk/libexec/log-processing/sec-to-min.pl
Log:
Clean up scripts


Modified: trunk/libexec/log-processing/sec-to-hour.pl
===================================================================
--- trunk/libexec/log-processing/sec-to-hour.pl	2011-04-12 19:31:49 UTC (rev 4345)
+++ trunk/libexec/log-processing/sec-to-hour.pl	2011-04-12 19:37:04 UTC (rev 4346)
@@ -1,16 +1,12 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -n
 
 # Convert the time unit from seconds to hours
+
 # INPUT:  A Swift log file with Unix time in the first columns
-#                  timestamp ... 
+#                  timestamp ...
 #         where timestamp is a number
 # OUTPUT: The same log file with the timestamp divided by 3600
 
-$load = 0;
-
-
-while (<STDIN>) {
-    @tokens = split;
-    $tokens[0] /= 3600.0;
-    printf("@tokens\n");
-}
+ at tokens = split;
+$tokens[0] /= 3600.0;
+printf("@tokens\n");

Modified: trunk/libexec/log-processing/sec-to-min.pl
===================================================================
--- trunk/libexec/log-processing/sec-to-min.pl	2011-04-12 19:31:49 UTC (rev 4345)
+++ trunk/libexec/log-processing/sec-to-min.pl	2011-04-12 19:37:04 UTC (rev 4346)
@@ -1,16 +1,12 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -n
 
 # Convert the time unit from seconds to minutes
+
 # INPUT:  A Swift log file with Unix time in the first columns
-#                  timestamp ... 
+#                  timestamp ...
 #         where timestamp is a number
 # OUTPUT: The same log file with the timestamp divided by 60
 
-$load = 0;
-
-
-while (<STDIN>) {
-    @tokens = split;
-    $tokens[0] /= 60.0;
-    printf("@tokens\n");
-}
+ at tokens = split;
+$tokens[0] /= 60.0;
+printf("@tokens\n");




More information about the Swift-commit mailing list