Hi
I am new to AWK, on Windows, and need to re-format textfiles like this one:
:54:any text on one line
:86:this text field co
vers two lines or ev
en more lines
:54:here is another text on one line
The result should show all lines beginning with :xx: ; the
record starting with :86: should be on 1 line only:
:54:any text on one line
:86:this text field covers two lines or even more lines
:54:here is another text on one line
What would be the best way -
First removing all newlines and inserting newlines at the beginning of every :xx: ?
Or better, remove only these newlines which are not followed by :xx: ? But then, how do I do that ?
SUB seems not to be suitable when all newlines are removed - at least, I get no output.
What would you recommend?
I am new to AWK, on Windows, and need to re-format textfiles like this one:
:54:any text on one line
:86:this text field co
vers two lines or ev
en more lines
:54:here is another text on one line
The result should show all lines beginning with :xx: ; the
record starting with :86: should be on 1 line only:
:54:any text on one line
:86:this text field covers two lines or even more lines
:54:here is another text on one line
What would be the best way -
First removing all newlines and inserting newlines at the beginning of every :xx: ?
Or better, remove only these newlines which are not followed by :xx: ? But then, how do I do that ?
SUB seems not to be suitable when all newlines are removed - at least, I get no output.
What would you recommend?