main.perl.join_deletes_with_collection.pl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twitter-tools Show documentation
Show all versions of twitter-tools Show documentation
Twitter tools for researchers
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