#!/bin/sh
#
#NAME
#  MailShars - send shar files to recipients
#
#SYNOPSIS
#  MailShars rcpt...
#
#DESCRIPTION
#  Mail all the shar files in the current directory to the recipients 
#  on the command line.  Note that we assume the shar that generates
#  names of the form foo.sh01, foo.sh02, etc.
#
#REQUIRES
#
#OPTIONS
#  None.  We send all the *.sh* files that we find.  If  a  recipient
#  isn't valid, you may get a LOT of bounces.
#
#BUGS
#
#SEE ALSO
#  Mail(1)
#
#AUTHOR
#  John Chambers <jc@trillian.mit.edu>


if [ -n "$DBG" ];then set -x;fi
for u
do	echo Mail to $u ...
	n=`echo *.sh*|wc -w`
	for f in *.sh*
	do	echo Mail $f
		(echo Subject: $f of $n; echo To: $u;echo ''; cat $f) | Mail -v $u
	done
done

