I have a text file with following contents
$ cat foo.txt
some text
[email protected]
8903457923
2018-02-09 07:12 (Asia/Kolkata)
again some text over here
some more text again
Message
some text
[email protected]
8903457923
2018-02-05 07:12 (Asia/Kolkata)
again some text over here
some more text again
Message
I would like to get following output
$ cat foo.txt
some text [email protected] 8903457923 2018-02-09 07:12 (Asia/Kolkata) again some text over her some more text again Message
some text [email protected] 8903457923 2018-02-05 07:12 (Asia/Kolkata) again some text over here some more text again Message
I guess I can achive this using tr and taking "Message" as a common string. But not sure how to implement this.