I'm using findstr
to search for a string in a file in the following manner:
findstr "test" file.txt
This is returning the line where test
is found, but I would like to return the 3 lines above and below the matching line. I've had a look and it doesn't seem like there are any in-built options to findstr
to return surrounding lines.