Merge multi-lines into one single line using shell script or Linux command

Hi,

Can anyone help me for merge the following multi-line log which beginning with a " and line ending with ": into one line.

Original Log

087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365;
"EXECUTED 



187;2008-12-06;"084403;mc;;SYHLR6AP1D\LNZW;AD-701;1;12473;SYHLR6AP1B;1.1.1.1;0000000129;
HGSNC:MSISDN=12345678,NAM=0,KEEP; NOT "ACCEPTED FAULT CODE 220 

Log line merged

087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365; "EXECUTED 187;2008-12-06;"084403;mc;;SYHLR6AP1D\LNZW;AD-701;1;12473;SYHLR6AP1B;1.1.1.1;0000000129;HGSNC:MSISDN=12345678,NAM=0,KEEP; NOT "ACCEPTED FAULT CODE 220 

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

1 Like

Your lines do not end in ":

1 Like

Look at the tr tool/command/utility.
If you are not familiar with this tool then use man tr for more information about 'tr'.

Also where has the whitespace come from BEFORE "EXECUTED ??