How to tell if a user is a group member in a script?

Kevin P. Fleming kpfleming at
Wed Oct 20 15:08:22 PDT 2004

I have a need to determine (in a bash script) whether the current user 
is a member of a given group, and I don't really want to parse 
/etc/group myself.

Anyone have any quick suggestions?

More information about the lfs-chat mailing list