11

Sed or Awk for lines between two strings multiple times and keep the last one

view full story
linux-howto

http://www.unix.com – Hi, I am trying to get lines between the last occurrences of two patterns. I have files that have several occurrences of “Standard” and “Visual”. I will like to get the lines between “Standard” and “Visual” but I only want to retain only the last one e.g. Standard Some words Some words Some words Visual Standard Some words Some words Visual Standard Some words Some words Some words Some words Visual Some words Some words I am trying to get the highlighted portion Thank you so much Dave Code: Standard Some words Some words Some (HowTos)