I have some text files where each file will have some information as below
235.91 245.67 B: some information here
246.79 246.99 A: some other information here,
more information here,
and may be here
247.45 248.99 A: some other text here,
some more here
249.98 ----
and the pattern repeats
I want the text to be arranged as follows:
235.91 245.67 B: some information here
246.79 246.99 A: some other information here, more information here, and may be here
247.45 248.99 A: some other text here. some more here
249.98 -----
That means I want to merge all the lines between two matching patterns( with spaces between them)
I want every line to start with the numbers as the pattern. The numbers always has a decimal point with two digits after the decimal point. The number of lines between a pattern and the next pattern varies (There can be one or more lines or no lines at all).
Could some one help me do this using shell scripting preferably using awk?