Windows Grep is a free search tool for Windows that allows you search the text of multiple files at the same time. Its interface, although simple, is very practical and, thanks to its assistant, it is really easy to perform searches.
Findstr in windows works similarly to grep in unix. For example you can do this: netstat -a findstr 8000 Another command find is also similar, with slightly different syntax and powers. I don’t remember which is which, but with one of them you can use regular expressions.
Download grepwin for free. A powerful and fast search tool using regular expressions. GrepWin is a simple search and replace tool which can use regular expressions to do its job. This allows to do much more powerful searches and replaces.
I love grep command on Linux, it helped to search and filter strings easily, always wonder what is the equivalent tool on Windows, and found this findstr recently.
In this article, I will share some of my favorite “grep” examples on Linux, and how to “port” it to Windows with “findstr” command.
How To Install Grep On Windows
1. Filter a result
1.1 Classic example to filter a listing result.
1.2 Add ignore case, and filter the listing result with multiple strings.
2. Search a File
2.1 Search matched string in a file.
2.2 Counting the number of matches.
3. Search a list of files
3.1 Search matched string in a list of files.
* (grep) -l , (findstr) /M = print only name of files containing matches.
How To Grep On Windows 10
4. Help
4.1 The most powerful command ~
Note Do you have other examples? Does share it below, thanks.
References
How To Grep On Windows 5
About the Author
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.