I have a lot of text files of transcripts. I have cleaned it to an extent. The last bit of cleaning is the following.
I have this in certain files *.txt
Gary: I said something.
Larry: I said something else.
Mr. John: I said this. And maybe this
and I also said this.
Laura: did i say anything.
I need it like this.
Gary: I said something.
Larry: I said something else.
Mr. John: I said this. And maybe this and I also said this.
Laura: did i say anything.
I want to move any line not containing colon (:) to the previous line. In the end I want each line to have a character's dialogue which ends with a newline.
I looked at this question but I couldn't figure out what to do. I am open to any tools sed/awk/python/bash/perl.