I am looking to find a way to script a cleaning operation on the /etc/group file on a large number of servers. Looking for users in a particular group more than once.
i.e. somegroup::100000:userA, userB, userC, foo, bar, snafu, userB, userB
Obviously for a small group this is easy and can be done manually, but I have some group files with large numbers of groups and entries.
I thought about writing it up in java since it should be pretty easy, but I would prefer finding something in perl or shell.