#!/usr/bin/perl my $basename = shift; my $dsc = $basename . '.dsc'; my $diffgz = $basename . '.diff.gz'; my $md5 = `md5sum $diffgz | cut -d' ' -f1`; my $size = `wc -c $diffgz | cut -d' ' -f1`; chomp $md5; chomp $size; open INFILE, "<$basename.dsc" or die "argh!\n"; while (<INFILE>) { if (/^ [^ ]+ [0-9]+ $diffgz/) { print " $md5 $size $diffgz\n"; } else { print; } } close INFILE;