Windows命令提示符中是否有与grep类似的实用程序,或者是否有第三方工具?


当前回答

我推荐PowerGrep

几年前我做了一个电子发现项目。我发现fisdstr有一些局限性,尤其是fisdstr最终会失败

该脚本必须使用几十个搜索词/短语在数千个文件中搜索。

Cygwin的grep工作得更好,它不经常阻塞,但最终我选择了PowerGrep,因为图形界面使它更容易判断崩溃的时间和地点,而且它非常容易编辑所有我想要的条件和输出。最终,PowerGrep是三者中最可靠的。

其他回答

Cygwin grep和更多;)

我推荐PowerGrep

几年前我做了一个电子发现项目。我发现fisdstr有一些局限性,尤其是fisdstr最终会失败

该脚本必须使用几十个搜索词/短语在数千个文件中搜索。

Cygwin的grep工作得更好,它不经常阻塞,但最终我选择了PowerGrep,因为图形界面使它更容易判断崩溃的时间和地点,而且它非常容易编辑所有我想要的条件和输出。最终,PowerGrep是三者中最可靠的。

Yes there is only one program for Windows PC which have solid GUI and it is essential util for me. I work as a developer and on every computer I've had, first thing install XFind program. It is created in 1997 and till now version is 1.0 and till now works and it is the best. Frequently I need to search some string in a ".cs", ".aspx", ".sct" (Visual FoxPro form code file) or just ".*" and XFind scans all files and show me files and another great thing is that you can look where string is in the file. XFind has also some kind of editor. If it binary file it will show you string finded. Try it and use it forever if you are developer like me.

PowerShell(在Windows 7/2008R2中作为标准包含,在XP/2003/Vista/2008中是可选的),它为此目的包含了select-string cmdlet。

我还发现了在Windows 7及以上版本中使用类似GREP的功能的另一种方法,无需安装任何额外的应用程序,在旧系统上,您可以使用安装Powershell。

在Powershell中,用户可以使用Where-Object,它具有相当全面的功能集,提供了GREP的所有功能以及更多。

希望有帮助。