Hello All
I want to print only the full name from the /etc/passwd file and print it to the screen .
Could you please let me know how can I do that?
Hello All
I want to print only the full name from the /etc/passwd file and print it to the screen .
Could you please let me know how can I do that?
awk -F: '{print $5}' /etc/passwd
or
cat /etc/passwd | cut -f5 -d":"
HTH
Thanks avronius and bluescreen for such a quick responce ....
Will it be possible to send that generated report to an email ?
Like I am doing like this currently but the email is not going throug
cat /etc/passwd | cut -f5 -d":" > abcd && mail mailaddresshere < abcd
cut -d ":" -f5 /etc/passwd | mailx -s "Report" abc.jam@foo.com
-Devaraj Takhellambam