Bob Beers wrote:
On Tue, Sep 23, 2008 at 7:26 PM, Barry Brimer lists@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.