I am just beginning with sed and awk and understand that they are "per" line input. That is, they operate on each line individually, and output based on rules, etc.
But I have multi-line text blocks that looks as follows, and wish to ONLY extract the text between the first hyphen (-) and the ending part of that phrase even though it is on a next line and may be several sentences. Note these text blocks are among many text blocks with similar features but the distinguishing feature of these text blocks are the *[digits]Some text with a hyphen - this is what I want to extract. Maybe even another sentence, too, on another line.
- [42]Things to do - Wash clothes, clean house, write letters, take dog for walk, watch tv, eat dinner.
- [43]Business items - Provide instructions to clients on property locations, write listing reports, copy contracts to computer disk, call state agencies.
My preferred end result using the above sample is:
Wash clothes, clean house, write letters, take dog for walk, watch tv, eat dinner. Provide instructions to clients on property locations, write listing reports, copy contracts to computer disk, call state agencies.
I could really use some help on this.
Thanks.