So I have a list of usernames such as:
user1
user2
user3
I want to apply id
on each of them and get something like:
uid=100(user1) gid=5(g1) groups=5(g1),6(g6),7(g10)
.
.
How can I achieve this? Please note that the list is the output of another command say mycommand
.
mycommand
expect? Or ismycommand
a script of yours and you are asking how to give it the list of usernames as the input? Please edit and clarify. – dessert Dec 18 '17 at 8:23