Skip to main content

All Questions

Tagged with
65 votes
7 answers
67k views

Newlines in sed on Mac OS X

I find that \n doesn't work in sed under Mac OS X. Specifically, say I want to break the words separated by a single space into lines: # input foo bar I use, echo "foo bar" | sed 's/ /\n/' But the ...
Ivan Xiao's user avatar
  • 2,825