Subject: Re: release script problem

From: "Dmitry Yu. Bolkhovityanov" <[email-masked]>
Date: Mon, 9 Apr 2001 19:37:55 +0700

On  9 Apr 01 at 7:20, [email-masked] wrote:

> Dominik Vogt <[email-masked]> writes:
> > On Mon, Apr 09, 2001 at 12:54:00PM +0700, Dmitry Yu. Bolkhovityanov wrote:
> ...
> > This one is much simpler:
> >
> >   grep "^`whoami`:" /etc/passwd | cut -f 5 -d ":"
>
> None of this works for me.
> Not all UNIX systems put an entry in /etc/passwd for
> the user.

    Oops...  You are right -- in case of NIS there will be nothing in the
/etc/passwd.  So, either Dominik's solution should be used (hardwiring in
Emacs config) or something like "finger `whoami`|head -1|..." (the latter
works at least in Linux, Solaris, FreeBSD, IRIX and OSF).

       ___________________________________________________________________
       Dmitry Yu. Bolkhovityanov  |  Novosibirsk, RUSSIA
       phone (383-2)-39-49-56     |  The Budker Institute of Nuclear Physics
                                  |  Lab. 5-13
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Mon, 09 Apr 2001 11:44:31 -0400

> works at least in Linux, Solaris, FreeBSD, IRIX and OSF).

Trying to reliably parse out the username from the finger output
isn't so easy:

Login       Name               TTY         Idle    When    Where
dane     Dan Espen             console       3d Thu 11:06 
...

I think you would need to know where the TTY column starts to find
the end of the user name.  None of the implementations I tested use
tabs to separate fields.

I think Perl rather  than emacs would  still be the best solution, but
the problem  isn't big enough to  worry about, I just  have to be more
careful.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]