Sed with new line

Sed with new line

am 27.08.2007 10:36:29 von struggle

Hi,
I want to use sed -e 's/,/\n/g' file to replace all "," to new line.
But I failed. Could anyone give me some advice?

Thanks!
Bo

Re: Sed with new line

am 27.08.2007 10:56:53 von pgas

On Aug 27, 11:36 am, Bo Yang wrote:
> Hi,
> I want to use sed -e 's/,/\n/g' file to replace all "," to new line.
> But I failed. Could anyone give me some advice?
>
put a litteral newline escaped with \ :

sed 's/,/\
/g'

or prefer:

tr ',' '\n'