erm this doesn't work as $3 is empty as you haven't specified the :
separater, or taken into account the password field in the group file

awk 'BEGIN{FS=":"}/irudev/ { printf("%s \n",$4); }' /etc/group
or
awk -F':' '/irudev/ { printf("%s \n",$4); }' /etc/group

is better, although it still doesn't remove the commas as the perl script
does.

ty
> -----Original Message-----
> From: Peter Rundle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 11 July 2002 12:55
> To: [EMAIL PROTECTED]
> Subject: Re: [SLUG] list group members
> 
> 
> 
> > Got one for AWK?  <g>
> 
> awk '/groupname/ { printf("%s ",$3); }' /etc/group
> 
> <G>
> 
> 
> -- 
> SLUG - Sydney Linux User's Group - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
> 
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to