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

Jay A. Konigsberg jak at sactoh0.UUCP
Sat Jun 2 17:58:42 AEST 1990


In article <900531083151.30e0b91a at Csa2.LBL.Gov> thermal%solgel.hepnet at CSA2.LBL.GOV writes:
>I would like to be able to send a mail message to all the users on
>a unix machine.  Of course, I could do it the long way, that is,
>do a 'finger' or 'who', thus getting a list of all the users, and
>then sending a mail message to each, one at a time.  Is there a
>quicker way? (it seems to me there could be two or three different
>ways, such as setting up a mailing list, or some nifty command that
>will do this on one stroke of the finger).  Obviously, I'm not a
>unix guru or wizard, so make your explanation understandable, please.
>
>Thanks, Dana


Write a shell script named "mall" (mail all - but I love the name).
It scans the /etc/passwd file and extracts those login names with
UID >= 100. You can also have an optional filename with the login
names you want the message sent to.

One note: doing this will probably mean that some of the mail will
sit unread in /usr/mail (or /usr/spool/mail), so be careful how you
write it. Accuctally, someone out there might have already written
it.



More information about the Comp.unix.wizards mailing list