Write results to a text file

I created a package that will use FINDSTR windows to search for my selective input.

I am trying to write the results of my search query to a text file called results.txt

So, I have something like this, so the results are not overwritten:

>>Results.txt 

I created a txt file so that it would write to him, this is what I tried and will not work:

findstr "\<%X%\>" *.txt  
echo >>results.txt

This is what I have in order to try to register the results of my search query, but nothing happens.

And when I have findstr "\ <% X%>" * .txt → results.txt

He tries to find >>results.txtand does not interact.

Does anyone know what to do?

, FINDSTR cmd, , , , results.txt, .

=)

+3
4

/c:

findstr /c:"<%X%>" *.txt >> results.txt

: .

0

→ results.txt

0

, :

 >>results.txt findstr "\<%X%\>" *.txt

\ >, , , >. , .

, , , , more:

type honkin_big_file | more

, .

0

:

findstr "\<%X%>" *.txt >>results.txt

:

findstr "\<%X%\>" *.txt >>results.txt

The difference in the first example is to search for any occurrence of "% X%>" at the boundary of the starting word, and the second example is "% X%" at the boundary of the beginning of the word with the boundary of the ending word (for example, one word "% X%").

This works for me.

0
source

Source: https://habr.com/ru/post/1726865/


All Articles