terminate prematurely when target disk is full
[rofl0r-filesync.git] / check_filesync_output_for_crc_errors.pl
blob0782a8d86241ce975ae7306b60151de2bca06512
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
5 while(<>) {
6 if(/CRC: (\w{8}), (.*?) -> (.*?) @([\d\.]+ MB\/s)/) {
7 my $crc = $1;
8 my $newfile = $3;
9 open my $chk_f, "-|", "./crc_check.out", $newfile;
10 my $chk = <$chk_f>;
11 chomp $chk;
12 close($chk_f);
13 print $newfile, ": CRC mismatch $crc, got $chk\n" if $chk ne $crc;