In the /etc/group we have many many users in one group, separated by comma like, jdoe,adoe,cdoes, etc.
I need to make a (one column) list for my report that looks like:
jdoes adoe cdoe ..... Assuming the group is named groupname...
Get the specific line out of the group file:
getent group groupname Delete the bit of the result before the last :
getent group groupname | sed 's/.*://' Replace the commas with newlines:
getent group groupname | sed 's/.*://' | tr ',' '\n'