home Mail List
Info
Info
Meetings
Goals
Upcoming
Projects
FAQ
Security
Links

[Date Prev][Date Next] [Chronological] [Thread] [Top]

[NMLUG] grep help



From: "James" <jamesh@swcp.com>
Sent: Friday, March 18, 2005 10:36 AM


> MEMBER=`egrep "^$2[,:]" /etc/group | egrep "[,:]$1([,:]|$)"`

  Thanks.  The egrep with parentheses works, though I wouldn't use two 
commands for the overhead.  I now have a little better understanding of 
regexp.

  'Course it became an interesting regexp exercise after the mention of 
`id -Gn $user`.  I haven't quite gotten comfortable with LDAP, yet.  I have 
a user, group, group membership database (among other internal things) and I 
was writing a script that would let non technical people's web-based changes 
to the database get reflected in all of our servers.  We are now in 5 
states.

  BTW, Gentoo rocks! 




Please send sugestions and comments to webmaster@nmlug.org.
Valid XHTML 1.1! Valid CSS! Powered by Debian Powered by Apache