grep utility for some time. Only recently have I find the solution, it seems Google search has been leading me astray! :)The command is:
findstrand it has been available since Windows XP.
For example if I wanted to search all the
.java files in the current directory and all sub-directories for "Class" I would use the following command.findstr /s /n "Class" *.javaThe
/s switch searches all sub-directories. The /n switch displays the line number where the match was found. If a match is found, the file name and path is also displayed.As another example, if I wanted to do a case insensitive search I would use:
findstr /s /i /n "Class" *.javaThe command also supports regular expressions so you can make your searches as complex as you want.
No comments:
Post a Comment