From: Colin Watson Date: Tue, 20 Aug 2002 14:29:23 +0000 (+0000) Subject: This is useless now that I no longer have a hermes account. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=e394b7307a969e545a0a6a1d8ee1890a4a253432;p=bin.git This is useless now that I no longer have a hermes account. --- diff --git a/query-hermes.pl b/query-hermes.pl deleted file mode 100755 index 5f9991e..0000000 --- a/query-hermes.pl +++ /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 -{ - ; - ; - $/ = undef; - my $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; -} -