Created
February 13, 2011 17:56
-
-
Save andrewgilmartin/824889 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This GIST has no other purpose than to demostrate that single-line perl scripts rock. | |
# This one extracts the time-stamp and duration from each matching record. | |
perl -ne 'if ( /(\d\d):(\d\d):(\d\d).*duration:\s*([\d,]+)ms/ ) { $time = ($1*60+$2)*60+$3; ( $duration = $4 ) =~ s/[^\d]//; printf( "%8d %5d\n", $time, $duration ); }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment