I want to write a shell script which will add list of users, defined in
users.txt, to multiple existing groups.
For example, I have
g users which will be added to the groups according to script, and I have
t groups. Below is the expected output of
/etc/groups file :
p:x:10029:a,c,d q:x:10030:b,c,f,g r:x:10031:a,b,c,e s:x:10032:c,g t:x:10033:a,b,c,d,e
so how to achieve this ?