I have a series of HTML files that are formatted like this:
cinema name
film 1
showtime 1
showtime 2
...
film 2
showtime 1
showtime 2
showtime 3
...
the name of the cinema is listed only one, at the top; then there is a list of films (any number of films could be here, from 1 to n), and then a list of showtimes (again, it could be 1 or more during the day.
i would like to extract this info using grep and output something like:
cinema name - film 1 - showtime 1
cinema name - film 1 - showtime 2
cinema name - film 2 - showtime 1
cineme name - film 2 - showtime 2
cinema name - film 2 - showtime 3
etc.
however, i'm not sure whether/how i can accomplish this with grep. is it possible? if so, how?