[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

grep-execuses -- testing update excuses utility



This is trivial, but maybe it will save someone else the bother. I'm
running it from a nightly cron job.

joey@silk:~/bin>./grep-excuses        
Usage: grep-excuses [email|package]
zsh: exit 255   ./grep-excuses
joey@silk:~/bin>./grep-excuses debconf
joey@silk:~/bin>./grep-excuses debconf
     * debconf 0.9.62 (currently 0.9.41) (important) (low)
          + Maintainer: Joey Hess <joeyh@debian.org>
          + only 3/10 days old
          + not considered

-- 
see shy jo
#!/usr/bin/perl
# Grep debian testing excuses file.
my $string=shift || die "Usage: grep-excuses [email|package]\n";
my $url='http://ftp-master.debian.org/testing/update_excuses.html';
open (PAGE, "lynx -dump $url -nolist |") or die "lynx failed";
my $item='';
while (<PAGE>) {
	if (/^\s+\*\s/) { # new item
		if ($item=~/$string/) {
			print $item;
		}
		$item=$_;
	}
	else {
		$item.=$_;
	}
}
close PAGE or die "lynx failed";

Reply to: