Created
February 1, 2015 17:37
-
-
Save ruicovelo/2581a62c0e1f4d9a13b9 to your computer and use it in GitHub Desktop.
Awkward way for getting run date, duration and distance from a set of tcx files
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
ls|while read file; do DATE=$(grep -m 1 StartTime "$file" | cut -d'.' -f 1| tr -s 'T' ' '| cut -d'"' -f2); TIME=$(grep -m 1 TotalTime "$file"| cut -d'>' -f2 | cut -d'<' -f1); DISTANCE=$(grep -m 1 DistanceMeters "$file"| cut -d'>' -f2 | cut -d'<' -f1); echo -e "$DATE\t$TIME\t$DISTANCE";done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment