On Mon, 2 Jul 2001 [EMAIL PROTECTED] wrote:

> On Mon, 2 Jul 2001, eric pareja wrote:
> 
> > GECOS=`cat /etc/passwd | grep ^$USERNAME | cut -f5 -d: | cut -f1 -d,`
> 
> Funny, I'd use
> 
> GECOS=`grep ^$USERNAME: /etc/passwd | cut -f5 -d: | cut -f1 -d,`
> 
> but then again, I'm just lazy. =)

yes, the ":" makes it narrow the hits to just the particular $USERNAME in
question. otherwise, it would return all occurences of
$USERNAME+somestring in the /etc/passwd file. i was lazy to touch up that
line further. aren't we all? jijo is smart and knows he can skin the cat
more ways than one. he'll figure it out.

he also has to remember to standardize his GECOS entries if he knows
what's good for him.

___ eric pareja ([EMAIL PROTECTED]) - "We're all crazy. No one wants to admit it."
\@/ http://gra.ph/~xenos/xenos.pgp | http://plug.linux.org.ph [O/////O]------+
 v  "Even the smallest person can change the course of the future."   / Clue |
      - Lady Galadriel in J.R.R. Tolkien's "The Lord of the Rings"   +-------+

_
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