dave
dave

Reputation: 306

windows 7 findstr

I used the findstr and tried to find some key word errors in an output file. I saved all the error code inside a finddata.txt. The search did run for a while, but I look at the results, The search placed each line with $findstr /c: "ORA-" text.err in the result file. The result file was huge, so I know something is wrong.

I obviously only need the results when findstr find something for me.

findstr /g:finddata.txt /f:text.err > text_err.out

-- here is the MSFT technet manual:

http://technet.microsoft.com/en-us/library/bb490907.aspx

Any help would be greatly appreciated.

Upvotes: 0

Views: 958

Answers (1)

Preet Sangha
Preet Sangha

Reputation: 65516

In the documentation you will see:

/f: file   : Reads file list from the specified file.

For each input line you asking FindStr to find a file with name of the data in the inputline, you don't need to do this. Just specify the file on the line.

Remove the /f:

findstr /g:finddata.txt text.err > text_err.out

Upvotes: 1

Related Questions