#!/bin/csh -f

##############################################################################
# 12/29/94 findwho
#
# Chris Alfeld
# trys to find  a useron host $1 and logs to file $2
# used with .fingerrc
##############################################################################

# initial finger
finger .local@$1>/tmp/findwho.tmp

# if host not running gnu fingerd retry
if ( `grep 'local' /tmp/findwho.tmp | wc -c` > 0 ) then
	finger @$1 >! /tmp/findwho.tmp
endif

# for easy grep
echo "   Status:" >> $2

# log
cat /tmp/findwho.tmp >> $2

# clean up
rm -f /tmp/findwho.tmp

