Hello,
Need help with following scenario.
A file contains following text:
{beginning of file}
New: This is a new record and it is not
on same line. Since I have lost touch with script
take this challenge and bring all this in one line.
New: Hello losttouch. You seem to be struggling with
this really simple challenge.
New: It is better that I ask some expert on unix.com
They will show you this is simple enough.
{end of file}
What I am trying to accomplish is to get all the lines starting from "New:" until next "New:" is read; on to one line. Resultant lines should be like:
New: This is a new record and it is not on same line. Since I have lost touch with script take this challenge and bring all this in one line.
New: Hello losttouch. You seem to be struggling with this really simple challenge.
New: It is better that I ask some expert on unix.com.They will show you this is simple enough.
As I mentioned in the above statements, I have lost touch with this, I am really struggling to accomplish this task. Any help is greatly appreciated.
Thanks so much.
EDIT: Needless to say that if I read next "New:" (lets say in any variable) it implies, my previous record is complete and should be displayed or appended to a file.