Is there a Pattern Matching Utility like GREP in Windows?

前端 未结 30 1012
不知归路
不知归路 2020-12-04 06:23

Is there a similar utility to grep available from the Windows Command Prompt, or is there a third party tool for it?

相关标签:
30条回答
  • 2020-12-04 07:00

    as mentioned, findstr works fine. example :

    C:>dir | findstr Windows

    11/06/2013 09:55 PM Windows

    0 讨论(0)
  • 2020-12-04 07:00

    An excellent and very fast file search utility, Agent Ransack, supports regular expression searching. It's primarily a GUI utility, but a command-line interface is also available.

    0 讨论(0)
  • 2020-12-04 07:02

    I'm surprised no one has mentioned FINDSTR. I'm no grep poweruser, but findstr does what I need it to, filter files and stdin, with some primitive regex support. Ships with Windows and all that. (Edit: Well someone did mention findstr, It's late I guess)

    0 讨论(0)
  • 2020-12-04 07:03

    Use Cygwin...

    it has 32 and 64 bits versions
    and it works fine from Windows 2000 (*)
    to Windows 10 or Server 2019

    I use Cygwin for a long time...
    and recently tryed to substitute with Windows-Linux-Subsystems...

    not for long...
    I quickly went back to Cygwin again...

    much more flexible, controlable and rich...
    also less intrusive...

    just add \bin to the path...
    and you can use it anyware in Windows/Batch/Powershell...
    or in a DOS-Box... or in a Powershell-Box...

    Also you can install a ton of great packages
    that really work... like nginX or PHP... I even use the Cygwin PHP package in my IIS...

    As a bonus wou can also use it from a bash shell...
    (I think this was the original intent ;-))

    0 讨论(0)
  • 2020-12-04 07:05

    Cygwin grep and more ;)

    0 讨论(0)
  • 2020-12-04 07:06

    It has been a while since I've used them, but Borland (Embarcadero now) included a command line grep with their C/C++ compiler. For some time, they have made available their 5.5 version as a free download after registering.

    0 讨论(0)
提交回复
热议问题