On Thu, 11 Jul 2002, Gavin Carr wrote:

> > > I am looking for a way to pipe the members of a particular group on a RH7.2
> > > system to a file. Is there such a command, or at least the list members
> > > command?
> > 
> > Something like this will work:
> > 
> > grep groupname /etc/group | cut -d : -f 4 | sed s/,/ /
> > 
> > That'll give you the group members as a space separated list.
> 
> Perlesque equivalent:
> 
>   perl -e 'print((getgrnam("groupname"))[3], "\n")'

Got one for AWK?  <g>

- Matt

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to