num of users in group

master
zeus 2021-02-26 16:29:53 +01:00
parent 5d9671174e
commit f9ba268170
1 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#!/bin/bash
GROUP="proj_mastcamz_mf"; echo "num groups for"; for i in $(getent group $GROUP | cut -d ":" -f 4 | sed 's/,/ /g'); do echo -n "$i: "; id $i | sed 's/,/\n/g' | wc -l; done
# output:
# num groups for
# user1: 26
# user2: 30