I'm trying to do something like this:
Say there are 4 users logged into a UNIX machine, a, b, c, and d.
Now, to get the groups these guys belong to, I have to type out :
groups a b c d.
What I am wondering, is if there is a way to do something like who | groups
where I can pipe the users currently logged-in to the groups command, which would then print out all the users given along with their group information. However, this does not seem to work as intended - rather, the above command just gives the group the first user belongs to.