Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!swrinde!emory!stiatl!todd From: todd@stiatl.UUCP (Todd Merriman) Newsgroups: comp.unix.questions Subject: Re: SEX! or, how do I mail to a lot of unix users? Message-ID: <10189@stiatl.UUCP> Date: 7 Jun 90 14:22:48 GMT References: <804@ehviea.ine.philips.nl> <1990Jun6.202659.12318@edm.uucp> Organization: Sales Technologies Inc. Atlanta, Ga. Lines: 52 if test "$1" -a "$2" -a "$3" then if test -r $2 then size=`wc -l $2` echo "$size recipients..." i=1 while test $i -le $size do curmod=`sed -n ${i}p $2` echo "** mailing to $curmod $i/$size" i=`expr $i + 1` case `uname -m` in miti2) mailx -s "$1" $curmod < $3 ;; i386) # rmail broken in Interactive mail $curmod < $3 ;; esac done else echo "$2 missing!" exit 1 fi else echo 'mailist ' exit 1 fi exit 0 .MODULE mailist .LIBRARY util .TYPE command file .SYSTEM unix .AUTHOR Todd Merriman .LANGUAGE C .APPLICATION mail .DESCRIPTION Mail to a mailing list .ARGUMENTS mailist .NARRATIVE The mailist utility calls the mail utility for each address in a mailing list. This utility allows the user to maintain mailing lists of virtually unlimited size (which is not possible using aliases with mailx). The mailing list is formatted such that each line contains one address. .RETURNS 0 if successful, 1 if the mailing list cannt be found .ENDOC END DOCUMENTATION