Thank you, to all those that they sent me a mail
Simon Tardell, Jeff Zabek, Gustavo Gibson...
and the possible solutions are:
1. Creating the [news] inside the system.
2. Create the file /etc/motd or /etc/issue, but this passes
you it without seeing it.
3. Creating a Scripts shell
******************************
#!/bin/sh
for username in `cat /etc/passwd | awk -F: '{print $1}'`
do
mail -s "Subject here" $username < message.filename
done
*******************************
You may try the following on Bourne Shell:
for i in cut -f1 -d: /etc/passwd
do
Mail -s "Subject" $i <anuncio
done
or if you use csh:
foreach i (`cut -f1 -d: /etc/passwd`)
Mail -s "Subject" $i <anuncio
end
********************************************
On Mon, 31 Mar 1997, Felix Ortigosa Martinez wrote:
>
> Hello Administrators
>
> I don't have much experience in UNIX but I need to know how shipping a
> mail to all my users of the servant, I have 150 users.
>
> I have attempted with the following command
>
> cp /etc/passwd passwd.old
> sed -n '14,164p' passwd.old | awk '{
>
> split($0,a,":");
> print a[1] ; *** Good ****
> mail a[1] <anuncio; **** Bad ****
> }'
>
> but without success some.
>
> Where - anuncio - in the mail to send.
>
>
> Regards.
> Felix.
>
>
>
>
Received on Mon Mar 31 1997 - 22:02:46 NZST