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


当前回答

我很惊讶没有人提到FINDSTR。我不是grep poweruser,但findstr做什么我需要它,过滤文件和stdin,与一些基本的正则表达式支持。装有Windows系统的船。(编辑:嗯,有人提到了findstr,我猜是晚了)

其他回答

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.

如果你想要一个GUI, Bare Grep是不错的选择。Gnu grep适合CLI

虽然在技术上不是grep或命令行,Microsoft Visual Studio和notepad++都有一个非常好的文件查找功能,完全支持正则表达式。我发现自己经常使用它们,即使我在命令行上也有CygWin版本的grep可用。

可能是一切?它支持regexp,也有一个控制台util。

如上所述,gnuwin32项目有一个Windows CLI版本的grep。

如果你想要图形界面,我会推荐(开源)工具AstroGrep。