Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 'findstr' command: Exclude results containing particular string

To the command findstr str1 *.* I want to add something that will exclude the results which contain the string str2.

In Linux the way of doing it is to add | grep -v str2 (to grep str1 * of course). Is there an equivalent flag to -v in Windows?

like image 478
Subway Avatar asked May 07 '14 07:05

Subway


1 Answers

Is there an equivalent flag to -v in Windows?

The equivalent to -v is /V.

C:\Users\Todd>findstr /?
Searches for strings in files.

...

/V         Prints only lines that do not contain a match.
like image 105
ta.speot.is Avatar answered Sep 25 '22 06:09

ta.speot.is