I have a text files with a list of users formatted like:
name1 name2 name3 ...
Calling the command groups gives the primary group name for that user. ex:
bash$ groups name1 name1: group_Name
I want to get the groups of all the users of the textfile and put this list of groups into a new text file.
Does anyone know a command for this? Maybe a script the iterates the first file with the names and calls groups on each name then stores the output in a new file. I just need a little help with the specifics.