Re: command to get my Full name from /etc/passwd



On Tue, 20 Nov 2007 18:05:09 +0000, Enrique Arredondo wrote:

Is there a command like "who am i" that will display my user full name when
I logged in ? If I do finger it brings up all instances so doesn't work for
me, I just want one line reported back to me.... ie john John Jones

Thanks

Do you want this to be a one time thing when you log in, or for it to be
your shell prompt, or do you want a command to do it when you request it?


grep $USER /etc/passwd | awk 'BEGIN { FS=":" } { print $5 } '
.



Relevant Pages

  • command to get my Full name from /etc/passwd
    ... Is there a command like "who am i" that will display my user full name when ... If I do finger it brings up all instances so doesn't work for ... ie john John Jones ...
    (comp.unix.sco.misc)
  • Re: command to get my Full name from /etc/passwd
    ... If I do finger it brings up all instances so doesn't work for ... ie john John Jones ... If it's not built into SCO, then it should be easily ported ... from the GNU software at www.gnu.org. ...
    (comp.unix.sco.misc)