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

Murray S. Kucherawy murray at motto.UUCP
Sat Jun 2 05:50:04 AEST 1990


thermal%solgel.hepnet at CSA2.LBL.GOV.UUCP writes:
>I would like to be able to send a mail message to all the users on
>a unix machine...

If you're lucky enough to have a system where each user has a directory
someplace common (ie. /u/<username> for each user), then csh has a nice
way of doing it:

1) Create the document you want to send

2) % foreach i (/u/*)
? mail -s "Memo for you" $i < source-file
? echo sent to $i
? end

That oughta do it...

=============================== Murray S. Kucherawy ==========================
Motorola Canada, Ltd.     Communications Division, Toronto      [on work term]
University of Waterloo, Ontario, Canada           2A Math (Comp Sci/Pure Math)
Internet: murray at motto.UUCP (work)       mskucherawy at watmath.UWaterloo.ca (UW) 
UUCP:     uunet!utai!lsuc!motto!murray   uunet!watmath!mskucherawy



More information about the Comp.unix.questions mailing list