Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (22 sloc) 427 Bytes
#!/usr/bin/perl
# Usage:
# dupmessages file1 file2
# Given two message files, prints all messages that are in file2 but
# not in file1
my %props = ();
open(INFILE, $ARGV[0]);
while (<INFILE>) {
if ($_ !~ /([^=]*)=/) {
next;
}
$props{ $1 } = 1;
}
close(INFILE);
open(INFILE, $ARGV[1]);
while (<INFILE>) {
if ($_ !~ /([^=]*)=/) {
next;
}
print $_ unless $props{ $1 };
}
close(INFILE);