I have a file that consists of two repeatedly occurring lines.
line1
line2
line1
line2
line1
line2
I want to merge them so that the output file would look like:
line1 line2
line1 line2
line1 line2
Unfortunately I didn't succeed. In notepad++ I could do something like:
search: (line1)(\r\n)
replace: \1
Here I wanted to do the same but this:
sed -E 's/(line1)(\n)/\1/' my_file
doesn't work