Alternative to sed, awk, grep:
xargs -n2 -d'\n'
This is best when you want to join N lines and you only need space delimited output.
My original answer was xargs -n2
which separates on words rather than lines. -d
can be used to split the input by any single character.