Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 28 lines (22 sloc) 0.584 kb
2b571bba »
2011-11-24 adding script to check timestamp formatting of the files
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 die "Usage: $0 FILENAMEs\n" if not @ARGV;
6
fd3c4dce »
2011-11-24 update script to complain on time mismatch as well
7 my $last_end = '';
8
2b571bba »
2011-11-24 adding script to check timestamp formatting of the files
9 while (my $row = <>) {
10 next if $row !~ /^\d+:/;
11 # 0:00:00.800,0:00:05.500
fd3c4dce »
2011-11-24 update script to complain on time mismatch as well
12 if ($row =~ /^(\d+:\d\d:\d\d\.\d\d\d),(\d+:\d\d:\d\d\.\d\d\d)$/) {
13 my ($start, $end) = ($1, $2);
14 if ($last_end) {
15 if ($last_end ne $start) {
16 warn "Mismatch in timestamps at row $. in $ARGV : previous end: '$last_end' current start: '$start'\n";
17 }
18 }
19 $last_end = $end;
20 } else {
2b571bba »
2011-11-24 adding script to check timestamp formatting of the files
21 warn "timestamp in row $. in $ARGV is incorrectly formatted\n";
22 }
23 } continue {
24 close ARGV if eof;
25 }
26
27
Something went wrong with that request. Please try again.