finger goodies?

finger goodies?

Post by Luke Higgi » Sat, 06 Mar 1993 04:01:23



        I was wondering what neat things people have set up for finger
on their system.  I have read that (at least on some systems) you can
tell when others finger you, and have a .plan that changes whenever you
are fingered.  I am interested in the details of both of these ideas
and any other things that people find interesting.
        Also, I have a friend in England that logs on 5 or 6 times a
day and I was wondering if anyone had some program that I could have
executed in my .login that checks every so often whether he is logged
on and if so tells me so that I can 'talk' with him.  I would
appreciate help with this problem and any other information on
programs concerning finger and related things.

        Thanks a whole lot!

        Luke Higgins (computer/UNIX novice)
        (Running SunOs 4.1)

 
 
 

finger goodies?

Post by Jim Dav » Sat, 06 Mar 1993 08:43:28



>    I was wondering what neat things people have set up for finger
>on their system.  I have read that (at least on some systems) you can
>tell when others finger you, and have a .plan that changes whenever you
>are fingered.  I am interested in the details of both of these ideas
>and any other things that people find interesting.

You should pick up a copy of the comp.unix.questions FAQ -- it discusses the
various problems with this.  If you missed the recent FAQ posting, you can
get a copy via anonymous ftp to rtfm.mit.edu, in
pub/usenet/comp.unix.questions (and if you can't do anonymous ftp, send mail

Anyway, if you're determined to forge ahead, here's the basic idea.  Instead
of having a conventional text file as your .plan, you create a named pipe
(aka fifo) instead, and run a process that writes to the fifo.  That process
will block until someone -- like a finger daemon -- tries to read the fifo.
Something like this:

---------------- clip clip clip ------------------------------------------
#!/bin/sh

case $# in
0) echo "Usage: $0 planfile" 1>&2; exit 1
esac

/etc/mknod $HOME/.plan p || exit 1

d=`date`
n=0
s=""

while :
do
        n=`expr $n + 1`
        test $n -gt 1 && s="s"

        (cat "$1";
         echo "I've been fingered $n time$s since $d.") > $HOME/.plan
done
---------------- plic plic plic ------------------------------------------

Put your real plan in an ordinary text file, say 'planfile'.  Then, if
you've saved this script in a file called 'dogwash', you'd give the commands

$ rm .plan
$ dogwash planfile &

to get started.  When somebody fingers you, the script will print the
contents of 'planfile', and after that print

I have been fingered 'n' times since 'd'

where 'n' will be incremented each time someone fingers you, and 'd' will be
the time the script started.

(For some reason I'm not interested in tracking down, the script may echo
the last line more than once under SunOS 4.1.1.  A 'sleep 1' just before the
'done' statement seems to help.)
--
Jim Davis               | "I'm not too bad with a baseball bat, either!"


 
 
 

1. FINGER: How can I know who is fingering or fingered me?

Hi, netters,

Does anybody know if I can aware somebody is fingering me or once fingered
me? If yes, can you tell me how? I once saw such kind of discussions here. I
think it is enough to know which machine is fingering me.

Many thanks.

--Yang Wang
------------------------------
Dept. of Systems Design Engg.
University of Waterloo
Waterloo, Ont. Canada N2L 3G1

2. Serial connection problems

3. fingering the finger daemon

4. User Accounts

5. Finger - Remote Finger Doesn't Display .Plan

6. CDROM

7. GNU Finger/Fingers that show multiple hosts...

8. Do DNS wildcards have a propagation delay?

9. Back finger to whom finger me

10. Finger - Not Showing LastLog Correctly - Problem fingerd or Finger?

11. Back finger to whom finger me

12. Finger: Scriptname when fingered...

13. finger and plan daemons: any way to get info on where the finger originated?