Quote:> Can someone help me write this script? I am really a beginner in this
> field. I wanna write a script which will keep track of whoever is
> fingering me. Do I have to write it in .plan file? What do I have to do
> for this? what environment variables can I use to do this? Where can I get
> a list of the environment variables? sorry, I am really a novice in this
> field...i am trying to learn.
First of all, the best favor that can be done of a shell scripting
novice is to corectly council you to not attempt to use csh (or
even tcsh) to write non-trivial scripts. Csh is a shell optimized
for interactive use, and the novice who sees a superficial resemblance
to C is initially attracted to csh over k/sh until s/he gets good
enough to understand the time spent learning it is wasted.
But for versions of finger(1) that you probably do not have (as usual
the query does not specify the OS...) the only semi-portable method that
I know of determining the user's name is a technique naming a named pipe
".plan" and while the finger(1) is blocked on this named pipe, the script
queries netstat(1) for the URL of the incoming network connection.
Not a non-trivial problem, as an instructor of mine used to say.
Best that you avail yourself of such programs that have been written
for the purpose:
finger-log - Finger Logging
rfinger - reimplementation of Berkeley finger, Part01/01