home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
1
/
1935
/
chatyell
< prev
next >
Wrap
Text File
|
1990-12-28
|
682b
|
26 lines
:
# chatyell tells someone to join the chat.
# Written by D'Arcy J.M. Cain
# $Id: chatyell,v 1.1 90/08/19 19:05:45 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