Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site heurikon.UUCP
Path: utzoo!linus!philabs!cmcl2!floyd!harpo!seismo!uwvax!heurikon!jeff
From: jeff@heurikon.UUCP
Newsgroups: net.chess
Subject: Move sending scrip
Message-ID: <207@heurikon.UUCP>
Date: Fri, 10-Feb-84 03:04:39 EST
Article-I.D.: heurikon.207
Posted: Fri Feb 10 03:04:39 1984
Date-Received: Sat, 11-Feb-84 23:13:53 EST
Organization: Heurikon Corp., Madison WI
Lines: 45
I have found this script helpful in sending off game moves.
When a move comes in, I use a mail command to append the message
to the end of the apprpriate "./chess/" file for that game.
Then I edit the end of the file, add my next move, exit the
editor and enter "send " This script ("send") mails
the move to the opponent and records that fact in a "log" file.
Does anybody else have some ideas along these lines? Please post.
###################################################################
:
# Send and log game moves. Game moves may be sent in one of two ways:
# If no arguments: All game[0-9]* files are checked. Any which
# have a lone "." on the last line of the game[0-9]* file will
# be sent. The last line of each such file will be deleted.
# With arguments: All filenames passed as arguments will be sent.
# No changes will be made to the files.
# In either case, it is assumed that the first line of the file
# is the destination path for 'mail' and that .. is your home dir.
#
if test $# -gt 0 ; then
for i do
dest=`head -1 $i`
echo ---- | cat $i - ../.signature | mail $dest
echo `date` Sent $i move to $dest >> log
done
else
for i in game[0-9]* ; do
if test "`tail -1 $i` " = ". " ; then
dest=`head -1 $i`
ed $i > /dev/null <<-"CMDS"
$,$d
w
q
CMDS
echo ---- | cat $i - ../.signature | mail $dest
echo `date` Sent $i move to $dest >> log
fi
done
fi
exit
--
/"""\ Jeffrey Mattox, Heurikon Corp, Madison, WI
|O.O| {harpo, hao, philabs}!seismo!uwvax!heurikon!jeff (news & mail)
\_=_/ ihnp4!heurikon!jeff (mail - fast)