I have a list like this:$$<002L_tbflPutative transcription factor 001R;GO:0006355GO:0046782GO:0006351IPR007031$$<002L_FRG3GUncharacterized protein 002L;GO:0033644GO:0016021IPR004251I want every $$< to start a new line, with the following entries on the same line (tab-separated), until $$< appears again.Like this:$$<002L_tbfl    Putative transcription factor 001R; GO:0006355  GO:0046782  GO:0006351  IPR007031$$<002L_FRG3G   Uncharacterized protein 002L;   GO:0033644  GO:0016021  IPR004251My method so far has been: tr '\n' '\t'   < stage1 > stage2sed 's/$$</\n/g' stage2 > stage3The thing is, the above works totally fine on small files, but on my 4GB file it seems to work, thenreturns a blank file within a fraction of the time with no errors or messages.I've also tried tr'$$<''\n' and that doesn't do it; it produces a weird file.
Technique to concatenate groups of consecutive lines, delimited by pattern
text processing;sed