All Questions
1
question
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 ...