How can I achieve the equivalent of grep -p using Windows findstr (or other Windows tools)?
In case it's not obvious, grep -p outputs the whole paragraph when it finds a match, that is all the lines between blank lines. I want to achieve the same using only functions that are part of Windows (I have a version of grep on Windows that I have no idea where I got it from, that has -p).
The built-in Windows tool
findstrdoesn't work exactly likegrep -pdoes. But we can get a similar result by usingfindstrtogether with other Windows tools.You may try this approach using
powershell