I need help with a command or script to merge 2 lines where ever we find the string.
I have attached scanned document.
First line has string value: VSIN, immediate line has value: SETTLEMENT
Where it finds the 2 string values in the whole file, one below the other, those 2 lines to be merged into a single line and the other detail data lines has to be remained in the same order.
E.g.:
Line1: VSIN .... (Space) SETTLEMENT CURRENCY ....
Line2: other detail data in the same order
Line3: VJRE ...
Line4: VJRE ...
Line5: VSIN .... (Space) SETTLEMENT CURRENCY ....
Line6: VJRE ....
Line7: VJRE ....
Line8: VJRE...
Line9: VSIN. ...(Space) SETTLEMENT CURRENCY....
....
....
Many thanks
Your help is much appreciated as I am not a core Unix programmer.
Many thanks
Karunya
I understood the issue now.
From the source file, end of the VSIN word line doesn't have space in it.
I tried your commands and it worked with the word (Space)
Please there is no (space) string in source file.
What I tried to mention was in the output I need a space between 2 lines after merging
Apologies if I confused you
---------- Post updated at 04:51 AM ---------- Previous update was at 04:47 AM ----------