home *** CD-ROM | disk | FTP | other *** search
- :
- # chatyell tells someone to join the chat.
- # Written by D'Arcy J.M. Cain
- # $Id: chatyell,v 1.2 90/10/26 22:53:46 darcy Exp $
-
- if [ $# -lt 1 ]
- then
- echo "Usage: chatyell user"
- else
- # The following test isn't perfect. If you want to chat
- # with user bill and he is not logged in but billy is then
- # the test shows bill as logged in. I'm sure there is a
- # really easy way to find out if someone is logged in but
- # I just don't happen to know it.
- if [ `who | awk "/$1/ {print \$1}" | wc -l` != 0 ]
- then
- write $1 <<- END_ECHO
- $LOGNAME wants to chat with you.
- Type chat at the prompt
- END_ECHO
- chat $2 $3 $4 $5 $6 $7 $8 $9
- else
- echo "$1 not currently logged on"
- fi
- fi
-