I have an input text that looks like this (comes already sorted):
on Caturday 22 at 10:15, some event
on Caturday 22 at 10:15, some other event
on Caturday 22 at 21:30, even more events
on Funday 23 at 11:00, yet another event
I need to delete all the matching words between the lines, from the start of each line, leaving only the first instance of each date.
To clarify, i need to turn it into something like this:
on Caturday 22 at 10:15, some event
some other event
at 21:30, even more events
on Funday 23 at 11:00, yet another event
So then I could format it like this to make it shorter, which is what I'm after:
on Caturday 22 at 10:15, some event; some other event; at 21:30, even more events
on Funday 23 at 11:00, yet another event
Is there a way to do something like this with sed and awk?