Last active
April 12, 2016 04:43
-
-
Save noodlebreak/60a2ba91d9d81e04db3032c00e210eaf to your computer and use it in GitHub Desktop.
This file contains 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
# Credits goto: Stackoverflow user gnperumal; http://stackoverflow.com/a/12172706/1114457 | |
# simple bash function list all the users in a group | |
# requires a python installation | |
function listusersofgroup { | |
python -c "import grp; print grp.getgrnam('$1')[3]" | |
} | |
# Usage: listusersofgroup <group-name> | |
# Gives: | |
['user1', 'user3', ..] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment