I have been doing some research in regards to the FindStr command and think I can use this to get the information I am after. I have a text file which is approx 200,000 lines and I only wish to extract the lines which contain particular text (as well as the subsequent line as this contains a summary line which is required in my investigation). I ran the command
FINDSTR /n "380133" audit.txt > RESULTS.OUT
Which has given me the line number. I have now done some manual intervention so that I have the line numbers of where the text has been found and the subsequent line. Is there anyway I can use this list of line numbers with the FINDSTR command to get all the info I’m after?
Or alternatively if there is a way I can use the original FINDSTR command to output the matching string line and the subsequent line to an output file that would help.
FINDSTR /n "380133" audit.txt > RESULTS.OUT
Which has given me the line number. I have now done some manual intervention so that I have the line numbers of where the text has been found and the subsequent line. Is there anyway I can use this list of line numbers with the FINDSTR command to get all the info I’m after?
Or alternatively if there is a way I can use the original FINDSTR command to output the matching string line and the subsequent line to an output file that would help.