This seems like it should be easy, but I can’t get the right syntax. I’m trying to use grep to find all files with a certain token that have at least one line following the line with the token in it. So something like:
blah blah token blah
another line here
would be found by the grep, but not:
blah blah token blah
I’m pretty sure
grepdoesn’t do multi-line stuff like this (though there is a -A option to print trailing context). One way would be to useheadto cut off the last line first, then pipe it togrep:Above code is not tested, I’m stuck on Windows atm.