I've spent the past hour trying different things and googling for this solution and cannot find the answer. Found variations of this, but not this exact thing.
I have the following text, which is the output from our mainframe. Each field is on a separate line, with a blank line between each record. I want to the lines together. A blank line indicates a new row. Note that some of the fields contain slashes, periods, and other punctuation. Also the number of lines to join is variable, but records are always separated by a single blank line.
This is the contents of the source text file:
7LKZB88901
DC090SDFKGHSDD
REJECT REASON DDP/09/Q
SCC/GO/SEX.M.DNY/ALASKA/ CONTACT THE DENYING AGENCY
For the following
DUPLICATE
7LKZB88902
DC090RDFK1HSDD
PENDING
8PKZB88903
DC0901DFK1HSD7
ACCEPT
7LKZB88901
DC090SDFKGHSDD
REJECT REASON DDP/09/Q
SCC/GO/SEX.M.DNY/ALASKA/ CONTACT THE DENYING AGENCY
For the following
ERROR
5KZZB88912
DC0901DFF1HGG2
ACCEPT
And here's what I want the output to look like:
7LKZB88901 DC090SDFKGHSDD REJECT REASON DDP/09/Q SCC/GO/SEX.M.DNY/ALASKA/ CONTACT THE DENYING AGENCY For the following DUPLICATE
7LKZB88902 DC090RDFK1HSDD PENDING
8PKZB88903 DC0901DFK1HSD7 ACCEPT
7LKZB88901 DC090SDFKGHSDD REJECT REASON DDP/09/Q SCC/GO/SEX.M.DNY/ALASKA/ CONTACT THE DENYING AGENCY For the following ERROR
5KZ4B88912 DC0901DFF1HGG2 ACCEPT
My script foo isn't powerful enough. Any help is appreciated with this one.