nicer output for merge with . for record and d for duplicate
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 20 Sep 2009 01:21:17 +0000 (01:21 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 20 Sep 2009 01:21:17 +0000 (01:21 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1301 07558da8-63fa-0310-ba24-9fe276d99e06

bin/isi-merge.pl

index aca4d81..433da6f 100755 (executable)
@@ -25,7 +25,7 @@ foreach my $file ( sort {
        my $b_r = $1 if $b =~ m{(\d+)-\d+};
        $a_r <=> $b_r;
 } @files ) {
-       warn $file;
+       print STDERR $file;
 
        push @{ $report->{files} }, $file;
 
@@ -39,18 +39,20 @@ foreach my $file ( sort {
                        $nr++;
                        my $digest = md5_hex $rec;
                        if ( my $times = $md5->{$digest} ) {
-                               warn "dumplicate $nr $digest $times\n";
+                               print STDERR 'd';
                                $report->{file}->{$file}->{duplicates}++;
                        } else {
                                print $out_fh $rec . $_;
                                $report->{file}->{$file}->{records}++;
                                $report->{total_records}++;
+                               print STDERR '.';
                        }
 
                        $md5->{$digest}++;
                        $rec = '';
                }
        }
+       warn "\n";
 }
 
 print $out_fh "EF\n";