in reply to inserting line break

Using sed(1) to modify EOL chars is, AFAIR, only possible iff you've accumulated a number of lines (by appending them in, using the H command, to) the hold space e.g. the following will cause all lines in file to be output on the same line:
# sed -n 'H;$x;$s,\n,,gp' file ^ ^ ^ ^ | | | | | | | | | | | For the last line only, globally strip all line ending +s in the pattern space and print the result | | | | | For the last line only, swap the hold and pattern spaces | | | Append each line to the hold space | Don't print any lines - by default all lines are printed follow +ing processing
A user level that continues to overstate my experience :-))