Windows'issterstr'命令:排除包含特定字符串的结果

Sub*_*way 8 windows command-line findstr

对于命令,findstr str1 *.*我想添加一些将排除包含字符串的结果的内容str2.

在Linux中,这样做的方法是添加| grep -v str2(grep str1 *当然).-v Windows中是否有等效的标志?

ta.*_*.is 9

-vWindows中是否有等效的标志?

相当于-v/V.

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

...

/V         Prints only lines that do not contain a match.
Run Code Online (Sandbox Code Playgroud)


1lO*_*91W 6

使用/V,例如:findstr "hello world" *.cpp | findstr /V ".git\\"