Replace comma with newline in sed on MacOS?

后端 未结 13 2023
借酒劲吻你
借酒劲吻你 2020-11-27 09:27

I have a file of id\'s that are comma separated. I\'m trying to replace the commas with a new line. I\'ve tried:

sed \'s/,/\\n/g\' file

b

13条回答
  •  独厮守ぢ
    2020-11-27 10:08

    FWIW, the following line works in windows and replaces semicolons in my path variables with a newline. I'm using the tools installed under my git bin directory.

    echo %path% | sed -e $'s/;/\\n/g' | less
    

提交回复
热议问题