Subject: Re: PROPOSAL: id(1) changes
To: Tim Rightnour <root@garbled.net>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-userlevel
Date: 04/01/2001 17:03:00
On Sun, 1 Apr 2001, Tim Rightnour wrote:
> 3) rather than modify id in option 2.. create a program called "gid". That
> seems hokey to me.
>
> I think I like option 2 the best.. comments?
I think what you really want is a shell frontend for getpwnam, getpwuid,
getgrnam, getgrgid, getpwent, getgrent. Putting that into a utility on
it's own and not overloading id(1) might be good.
IIRC Solaris had a bunch of such tools to dig through these databases, but
I can't remember the names.
What I personally use is some tcsh alias:
rfhpc8317% alias getpwnam
perl -e '$,="\n"; @a=getpwnam($ARGV[0]); print @a,"";'
... but of course that needs perl.
- Hubert
--
Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>