tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* [s] Send mail..
@ 1997-03-31 19:45 Felix Ortigosa Martinez
  0 siblings, 0 replies; only message in thread
From: Felix Ortigosa Martinez @ 1997-03-31 19:45 UTC (permalink / raw)
  To: tru64-unix-managers


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.
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-03-31 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-03-31 19:45 [s] Send mail Felix Ortigosa Martinez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox