[CentOS] Shell script to list group members
Tim Alberts
talberts at msiscales.comTue Sep 23 23:51:25 UTC 2008
- Previous message: [CentOS] Shell script to list group members
- Next message: [CentOS] Shell script to list group members
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bob Beers wrote: > On Tue, Sep 23, 2008 at 7:26 PM, Barry Brimer <lists at brimer.org> wrote: > >> With commas separating groups: >> >> getent group | egrep -i '^groupname:' | awk -F : '{ print $4}' >> >> With spaces separating groups: >> >> getent group | egrep -i '^groupname:' | awk -F : '{ print $4}' | sed -e 's/,/ >> /g' >> >> > > > ok, Barry wins. :) > > But, I don't think you need the egrep ... > > getent group groupname | ... > > works ok for me. > > -Bob Excellent, 'getent group...' should do perfectly. Thanks Barry and Bob. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20080923/d0c17202/attachment-0001.vcf>
- Previous message: [CentOS] Shell script to list group members
- Next message: [CentOS] Shell script to list group members
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list