Re: Script for mailing /etc/passwd information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



a bv wrote:
> Hi list,
> 
> I need a script which will get the users and their shell from
> /etc/passwd file and mail it to the company mail account which i use
> on Lotus Notes. Im not yet a scripting guy so i wanted to ask to you.
> 
The least complicated:

awk 'BEGIN { FS = ":";}{print $1 " " $NF;}' /etc/passwd | mail -s "users and
shells" <whoever's email address>

	mark

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux