[CentOS] Shell script to list group members
Bob Beers
bob.beers at gmail.com
Tue Sep 23 23:09:05 UTC 2008
On Tue, Sep 23, 2008 at 1:31 PM, Tim Alberts <talberts at msiscales.com> 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
More information about the CentOS
mailing list