[1219] in Release_7.7_team
Print queue alert script
daemon@ATHENA.MIT.EDU (Naomi B. Schmidt)
Fri Feb 20 09:52:18 1998
To: release-team@MIT.EDU
Date: Fri, 20 Feb 1998 09:52:12 EST
From: "Naomi B. Schmidt" <nschmidt@MIT.EDU>
Can someone please take a look at the following, which came into
software suggestions, and decide what to do with it?
Thanks - Naomi
[2048] boojum@ATHENA.MIT.EDU Athena Software Suggestions 02/19/98 13:22 (24 lines)
Subject: Re: print queue alert script
So I wrote one of these, and it's in /mit/boojum/bin/qsend. Okay, so it
looks like it was written by someone who doesn't speak much perl but
has a manual handy, because it was. (there's an alternate version
written by someone who *does* speak perl, but didn't have a manual, in
/mit/justom/Scripts/zprinterq.pl)
#!/afs/athena/contrib/perl5/p -w
use Shell qw(lpq);
$queue = lpq("-P$ARGV[0]");
@lines = split /^/m, $queue;
@rightlines = grep /bytes/, @lines;
foreach $aline (@rightlines) {
@thingy = split / +/, $aline;
push @usernames, $thingy[1];
}
$tozephyr = join " ", @usernames;
system ("zwrite $tozephyr");
-Laura