  | |  | command to list all members of a group? | command to list all members of a group? 2004-07-06 - By Shane C Branch
Back Scot L. Harris wrote:
> On Tue, 2004-07-06 at 12:17, Matt Brodeur wrote: >> -- --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. > > why not: > > grep groupname /etc/group > > Replace groupname by the name of the group you are looking for. >
Thanks.
Both seem to work equally well.
-- regards,
shane
-- Shrike-list mailing list Shrike-list@(protected) https://www.redhat.com/mailman/listinfo/shrike-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |