sed ':a; N; $!ba; s/
//g' input.txt
#I cameI sawI conquered!
# Let’s understand how it works:
# :a; – we define a label called a
# N; – append next line into sed‘s pattern space
# $!ba; – if the current line is the last line ($), do not (!) jump to the label :a (a)
# s/
/REPLACEMENT/g – replace all line breaks with the given REPLACEMENT