SEX! or, how do I mail to a lot of unix users?

Jonathan I. Kamens jik at athena.mit.edu
Tue Jun 5 18:17:24 AEST 1990


In article <132 at motto.UUCP>, murray at motto.UUCP (Murray S. Kucherawy) writes:
|> 2) % foreach i (/u/*)
|> ? mail -s "Memo for you" $i < source-file
|> ? echo sent to $i
|> ? end
|> 
|> That oughta do it...

  No, actually, it shouldn't "oughta do it".  If you do that, you're
going to attempt to send mail to a lot of addresses of the form
/u/username, something which is in all probability not going to work.

  Either you want to change the first line to 

    foreach i (`cd /u; echo *`)

or you want to change the second line to

    mail -s "Memo for you" $i:t < source-file

  In any case, this doesn't answer the [amended] question which was
asked, since the original poster was talking about sending to everyone
at a remote site.  However, I don't like to see wrong information
posted, even when the wrong information wouldn't answer the right
question even if it were right :-).

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710



More information about the Comp.unix.questions mailing list