chiark / gitweb /
This is useless now that I no longer have a hermes account.
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 20 Aug 2002 14:29:23 +0000 (14:29 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 20 Aug 2002 14:29:23 +0000 (14:29 +0000)
query-hermes.pl [deleted file]

diff --git a/query-hermes.pl b/query-hermes.pl
deleted file mode 100755 (executable)
index 5f9991e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /usr/bin/perl -w
-use diagnostics;
-use strict;
-
-my $arg = shift;
-
-print "Querying hermes for $arg ... ";
-
-my $pid = open FINGER, "-|";
-if (!defined $pid)
-{
-       print "can't fork: $!\n";
-       exit 2;
-}
-elsif (!$pid)
-{
-       if (not exec 'finger', "$arg\@hermes")
-       {
-               print "can't exec finger: $!\n";
-               exit 2;
-       }
-}
-else
-{
-       <FINGER>;
-       <FINGER>;
-       $/ = undef;
-       my $finger = <FINGER>;
-       close FINGER;
-
-       unless (defined $finger)
-       {
-               print "no matches\n";
-               exit 1;
-       }
-
-       my @people = split /\n/, $finger;
-       foreach my $person (@people)
-       {
-               $person =~ s/^([^ ]*) *(.{1,20}[^ ]).*$/$1\t$2/ or $person = '';
-       }
-       @people = grep /./, @people;
-
-       if    (@people == 0) { print "no matches\n"; exit 1; }
-       elsif (@people == 1) { print "1 match\n"; }
-       else                 { print scalar(@people), " matches\n"; }
-
-       print "$_\n" foreach @people;
-}
-