Windows'findstr'命令:排除包含特定字符串的结果 [英] Windows 'findstr' command: Exclude results containing particular string

查看:1159
本文介绍了Windows'findstr'命令:排除包含特定字符串的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在命令 findstr str1 *。* 中,我想添加一些东西,以排除包含字符串 str2

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

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

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?

推荐答案


在Windows中是否有与 -v 等效的标志?

等效于 -v / V

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

...

/V         Prints only lines that do not contain a match.

这篇关于Windows'findstr'命令:排除包含特定字符串的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆