On Mon, 2 Jul 2001, Federico Sevilla III wrote:
..
> finger $1 | grep Name: | awk '{printf("%s",$4)}'
>
> but this can't handle spaces in the fullname which happens all the time. I
> cannot brute force a two-word name limitation, either.

Why not:

GECOS=`cat /etc/passwd | grep $USERNAME | cut -f5 -d:`

where USERNAME would hold the username you want?


-- 
Orlando Andico <[EMAIL PROTECTED]>
Mosaic Communications, Inc.

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE d(-) s: a-25 C++++ UBLSI++++$ P+++ L+++>++++ E- W++ N(+)
o K? w O-- M- !V PS(++) PE- Y PGP-- t(+)@ 5(+) X++@ R(+) tv@
b++ DI++ G e++@ h--(*) r% y+
------END GEEK CODE BLOCK------

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to