Yes, I know that's simple. I know how to get the name once I have a user id. My problem is I need to somehow scan thru the comma delimited user id list and retrieve one id at a time so that I can find the name in the passwd file.
My original command will give me the user login id list.
cat /etc/group|grep ^X:|cut -d: -f4
How do I scan thru this login id list, find the name for each of the ids, and print each id & name per line?
For example, the list of ids is ID1,ID2,ID3.
I want the report to show
ID1 John Doe
ID2 Jane Doe
ID3 John Smith
I hope this is clear. If not, let me know.
Thank you very much for your help.