How do I search for a phrase over multiple lines? E.g. Lets have the phrase "my ice tea" then it may be wrapped in text files:
as js skdfh dfh djh sf my
ice tea.
grep will not match since there is a newline in between. How do I match those? Another multiline pattern would be pattern1_\n_pattern2
I know the easiest way I do ATM is just grep for one part e.g. just ice with -A2 -B2 flag and then in that output againg for e.g. tea. But this is very tedious. So I am interessted on how do you would solve this.