Re: command to list all members of a group?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----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@xxxxxxxxxxxx                                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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux