in reply to inserting line break
# 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
|
|---|