#!/bin/csh -f
#Usage: eachmail fileofaddressees fileofmessage subject
#echo $argv[*]
foreach i (`cat $1`)  # will create a list of the names in $1
	cat $2 > /tmp/gw.$$
	cat >> /tmp/gw.$$ << ENDOFINPUT

		Your pal,
			$LOGNAME@`uname -n`
	ENDOFINPUT
	cat /tmp/gw.$$ | mailx -s "$3" $i
end
rm /tmp/gw.$$
