thermal%solgel.hepnet@CSA2.LBL.GOV (05/31/90)
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
mcdowell@e34b..austin.ibm.com (Steve McDowell/50000) (06/01/90)
> How do I send mail to everyone on the system??
How about this:
% mail `cat /etc/passwd | awd -F: '{ print $1 }'` < mailfile
The awk pattern simply extracts the usernames from the passwd file.
Steve McDowell (mcdowell@e34b.austin.ibm.com) VNET SC10191@AUSVM6
Contractor to IBM AIXv3 Base Kernel Development T/L 793-3883
Outside IBM: ..!cs.utexas.edu!ibmaus!auschs!e34b.austin.ibm.com!mcdowell
DISCLAIMER: My statements do not necessarily reflect the position of IBM.