[CentOS] Shell script to list group members

MHR mhullrich at gmail.com
Wed Sep 24 04:52:44 UTC 2008


On Tue, Sep 23, 2008 at 6:43 PM, Barry Brimer <lists at brimer.org> wrote:
>
> The egrep is using a leading anchor (^) to make sure the grep matches the
> beginning of the line.  If not, and the group pattern matched as one of the
> users it would print those lines too .. which is probably undesirable.
>

Grep understands the '^', so egrep is not needed.  Typically, you only
need egrep for patterns that involve alternative re's, like looking
for one of "abc|def|ghi" which grep does not recognize.

Also, it might be helpful to trim your replies so we don't need to
wade through the whole thread to see your reply.

mhr



More information about the CentOS mailing list