  | |  | command to list all members of a group? | command to list all members of a group? 2004-07-06 - By Matt Brodeur
Back -- --BEGIN PGP SIGNED MESSAGE-- -- Hash: SHA1
On Tue, Jul 06, 2004 at 11:54:26AM -0400, shane c branch wrote:
> However, I need to issue a command that does the opposite. I want to see > all the memembers of a given group. How do I do this?
I'm sure there's a better way, but this should work, assuming you have access to the group file:
$ awk -v FS=':' '/^GROUPNAME/ { print $4 }' /etc/group
This could likely be done in <5 characters of perl, but it's effectively Monday here and I don't want to think too hard.
- -- Matt Brodeur RHCE MBrodeur@(protected) http://www.NextTime.com
Any sufficiently advanced technology is indistinguishable from magic. -- Arthur C. Clarke -- --BEGIN PGP SIGNATURE-- -- Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFA6tC0c8/WFSz+GKMRAszwAJ9pfy90j6NBSjrrFGQkGZNUhit4DACeMsp8 wu4G6dxhnsuBX9jy2YM1+W0= =nJSp -- --END PGP SIGNATURE-- --
-- Shrike-list mailing list Shrike-list@(protected) https://www.redhat.com/mailman/listinfo/shrike-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |