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


当前回答

其中,一体化的busybox包含grep / egrep / sed / awk等

从下面得到:

http://frippery.org/busybox/index.html http://frippery.org/files/busybox/?C=M;O=D

更新:不再可用-或一些旧的

https://github.com/pclouds/busybox-w32

其他回答

其中,一体化的busybox包含grep / egrep / sed / awk等

从下面得到:

http://frippery.org/busybox/index.html http://frippery.org/files/busybox/?C=M;O=D

更新:不再可用-或一些旧的

https://github.com/pclouds/busybox-w32

更新:最初问这个问题的时候不是这样的,但是现在微软允许为Linux安装Windows子系统,然后Windows将运行grep。在PowerShell中运行:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

在Windows上,我使用Far Manager进行文件搜索。BSD许可,在控制台工作,节省输入cmdline参数的时间。下面是Alt-F7调用的搜索对话框。

Grep for Windows by GnuWin Project(2014-10-02:它已经过时了,见下面的评论)

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