Formatting 'defaults domains' output on multiple lines Just a quick question here. I'm trying to format the output of the command:

defaults domains


so that it puts each domain on a new line, so I can use that parsed output in a different command.

I've tried:

defaults domains | sed 's/,/\n/g'


Which should take the output of default, find each comma, and replace with a new line correct? Instead it just removes the comma and keeps each item on the same line.

I thought, maybe it's something with the encoding of the dafaults command output, so I dumped to a file and tried parsing that, but no dice.

Anyone have any idea how I can achieve this?
Never mind. Not sure why sed didn't work the way I wanted it to, but I just used:

tr ',' '\n'


and it worked fine.