更新时间:2022-02-23 07:55:42
此处正在使用sed
echo "Replace <newLine> it by <newLine> NEWLINE <newLine> in my OSX terminal <newLine> and bash script" | sed 's/<newLine>/\'$'\n/g'
这是一篇博客文章,解释了为什么-https://nlfiedler.github.io/2010/12/05/newlines-in-sed-on-mac.html
And here is a blogpost explaining why - https://nlfiedler.github.io/2010/12/05/newlines-in-sed-on-mac.html