findstr /i /s /g:ip-pool.txt *.txt > result.txt
This is what I am inputting into the batch file and it seems to do the trick. The only issue is that when searching a certain ip address or string, it will print all occurrences. What I am trying to figure out is how it can only print me out one occurrence per hit. So for example:
1.1.1.1
1.1.1.1
1.1.1.1
1.2.1.2
1.2.1.2
1.2.1.2
1.3.1.3
1.3.1.3
1.3.1.3
To come out at the end like:
1.1.1.1
1.2.1.2
1.3.1.3
Does not have to necessarily be ip addresses, just would like one searched string be outputted once instead of several (hundred) times.
Any help would be greatly appreciated.
Thanks!