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

Andrew Cunningham ac1 at rosemary.cs.reading.ac.uk
Sun Jun 3 21:42:33 AEST 1990


In article <11990 at encore.Encore.COM> jdarcy at zelig.encore.com (Mostly Harmless) writes:
>thermal%solgel.hepnet at CSA2.LBL.GOV:
>> I would like to be able to send a mail message to all the users on
>
>The simplest way I can think of is:
>
>    mail `awk -F: '{print $1;}' < /etc/passwd`
>

If all users home directories are in the same place (e.g. /users/ac1,
/users/someone, /users/foo etc)   then you can do

		cd /users; mail *

At worst you might have to do this two or three times to get all users on the
whole system.  Remember that there will be a copy made of the message for EVERY
user you send it to - which could amount to a lot of disk space!


AndyC



#include <disclaimer.h>    When in doubt, use brute force - Ken Thompson 
"Truly, the way of enlightenment is like unto half a mile of broken glass"
		-- Ignatious Cutwell, B. Mgc. (UU)
ARPA:		ac1%csug.cs.reading.ac.uk@{ucl-cs.arpa,nsfnet-relay.ac.uk}
UUCP:		ac1%csug.cs.reading.ac.uk at ukc.uucp           /* one of these */
Internet:	ac1%csug.cs.reading.ac.uk at cunyvm.cuny.edu    /* must work! */
JANet:		ac1 at uk.ac.reading.csug.cs



More information about the Comp.unix.wizards mailing list