Re: Shell script to list group members

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



On Tue, Sep 23, 2008 at 1:31 PM, Tim Alberts <talberts@xxxxxxxxxxxxx> wrote:
> So essentially, I am looking for a (simple) shell command to run from a bash
> script that will allow me to list user accounts that belong to a particular
> group.  Any help is appreciated.

grep <group_name>: /etc/group | cut -d: -f4

will give a comma separated list, provided <group_name> is a valid group name.

HTH,
-Bob
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux