I have an example dataset where a section has fields beginning with "something". I would like to obtain all of the lines in each "something" section when matching a specific string of "1234".
I was thinking that I could search for "1234" and print all lines before and after until matching "something".
Desired output:
something like this one
1234
abcd
something like this one
zyxw
1234
Example dataset:
otherthings
otherthings
otherthings
something like this one
1234
abcd
something not like this one
xxxx
yyyy
something not like this one
xxxx
yyyy
something like this one
1234
abcd
otherthings
otherthings
otherthings
somethingand others withotherthings(like in your example), or are all records starting with a unique identifier? I.e.:otherthingsis reallysomething++ ? (If you get what I mean.) – Runium Apr 21 '16 at 22:42