All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.perl.join_deletes_with_collection.pl Maven / Gradle / Ivy

The newest version!
#!/usr/bin/perl

# Joins together deletes and collection tweetids to identify the
# deleted statuses.

$USAGE = "$0 [deletes (bz2)] [collection (bz2)]";

$deletes = shift or die $USAGE;
$collection = shift or die $USAGE;

open(DATA, "bzcat $deletes | ");
while ( my $line =  ) {
    chomp($line);
    $H{$line} = 1;
}
close(DATA);

open(DATA, "bzcat $collection | ");
while ( my $line =  ) {
    if ($line =~ /^(\d+)/ ) {
	print $line if exists($H{$1});
    }
}
close(DATA);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy