Replace comma with newline in sed on MacOS?

macos, sed, unix

Solution

Use `tr` instead:

tr , '\n' < file

Problem

I have a file of strings that are comma separated. I'm trying to replace the commas with a new line. I've tried: ``` sed 's/,/\n/g' file ``` but it is not working. What am I missing?

Original source

Related problems