Присоединяйтесь к рядам в одной строке Linux

sed ':a; N; $!ba; s/\n//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/\n/REPLACEMENT/g – replace all line breaks with the given REPLACEMENT
Ill Ibex