I was looking for a sed script to concatenate mutiple lines into one and came across this post which provided this scriptwith the following explanation
sed -e :a -e N -e 's/\n/ /' -e ta yourfile.txt >newfile.txt
I tried this, but it doesn't work. Is it only for GNU sed?: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