I have a text with marker lines like:aaa---bbb---cccI need to get a text from the last marker (not inclusive) to EOF. In this case it will becccIs there an elegant way within POSIX.2? Right now i use two runs - first with nl and grep for the last occurrence with respective line number. Then i extract the line number and use sed to extract the chunk in question.The text segments may be quite large so i'm afraid to use some text-adding method like we add the text to a buffer, if we encounter the marker we empty the buffer, so that at EOF we have our last chunk in the buffer.Upd: 5 views for 24 hours, so i'll update the tags so incorrect ones:(
Getting text from last marker to EOF in POSIX.2
text processing