#!/usr/local/bin/perl -w # # lastmates (C) 1996-2000 Stuart Caie # when were your friends (or enemies) last logged in? # this is distributed under the terms of the GNU public license version 2 # use strict; $_=$0; my $conf=(/hates$/)?'.hatesrc':'.matesrc'; die "No $conf file.\n" unless open MATES,"<$ENV{'HOME'}/$conf"; my @unk; foreach () { if (!/^#/ and /\s*(.+?)\s*\=/) { my $mate = $1; my @last = `last $mate`; if ($last[0] =~ /^$/) { push @unk, $mate } else { print $last[0] }; }; } close MATES; if (scalar(@unk) > 0) { print "Haven't been on recently: ".(join ' ', (sort @unk))."\n"; };