Code:
sed -e :a -e N -e 's//n/ /' -e ta yourfile.txt >newfile.txt
:a # label 'a' to jump back to later on N # Append next line to sed's buffer s//n/ / # replace exactly one newline (/n) with a space ta # if the last replace command was succesfull, jump to label 'a'. # (if this does not happen, the entire file was read: end