I have data that looks like this:
> sq1
foofoofoobar
foofoofoo
> sq2
quxquxquxbar
quxquxquxbar
quxx
> sq3
foofoofoobar
foofoofoo
> sq4
foofoofoobar
foofoo
I want to join the lines on the basis of ">sqi" header as cut-off line, i.e. yielding:
foofoofoobarfoofoofoo
quxquxquxbarquxquxquxbarquxx
foofoofoobarfoofoofoo
foofoofoobarfoofoo
I tried using this sed
but fail:
sed '/^S/d;N;s/\n/\t/'
What's the correct way to do it?