My problem is to extract text from lines in /etc/passwd matching a specific pattern
Only text before the ":*" needs to be selected each line
I want the output seperated by commas.
Here's an example:
dog:*dsfgfdh
cat:*bsdfsdf
To:
dog, cat
I have tried something like this which obviously doesnt work
cat /etc/passwd | grep 'a patern'
Anyone with more understanding of grep wanting to help?