Hi could you please help me parse the following in bash.
i have a file that has one entry per line, and each line has the following format.
"group:permissions:users"
where permissions and users could have more than one value separated by comas... like this
"grp1:create,delete:yo,el,ella"
what i want is to return the following
yo
el
ella
i came up with this..
cat file | grep grp1 -w | cut -f3 -d: | cut -d "," -f 2
This returns "yo,el.ella", any ideas how can i make it return one value per line?
Thanks