Created
March 31, 2015 11:44
-
-
Save WagnerMatos/23178d5e1f4e9f069720 to your computer and use it in GitHub Desktop.
List all users within a group in OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
members () { dscl . -list /Users | while read user; do printf "$user "; dsmemberutil checkmembership -U "$user" -G "$*"; done | grep "is a member" | cut -d " " -f 1; }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment