![]() ![]() Var replaceSingleQuotes=false, printMatchesOnly=false, matchString, flagString, regex, argDx=0 ![]() Var args=WScript.Arguments, argCnt=args.Length, stdin=WScript.StdIn, stdout=WScript.StdOut This version works much more like how you would want the GNU version to work in Windows: //nologo //E:jscript %~f0 :eof */ I wrote this because getting the escape characters right in the GNU Win32 grep port was a real pain. #Grep for windows shell how to#So far I have svn info findstr 'Revision:' and that works fine, but I dont know how to pipe the result to the for to isolate the number from the word. I wrote a Windows alternative to grep using Hybrid Batch/JScript code. I have this for Linux: svn info grep 'Revision:' cut -d: -f2 that gives me the '102' from the string 'Revision: 102' and I need the equivalent in Windows BAT file. The syntax is different to that of grep, note, as is the regular expression capability. There are also PowerGREP, Bare Grep, grepWin, AstroGrep, and dnGrep, although these are all GUI programs not TUI programs. By default, grep prints the matching lines. Tim Charron has a native Win32 version of a modified GNU grep, for example. The grep command searches the given input files for lines containing a match to the given PATTERN. c:\> FindStr / Searches for strings in files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |