Rob van der Woude's Scripting Pages

Help text for RxGrep.cs

(view help text of RxGrep.cs as plain text)

RxGrep,  Version 2.03
Multi-line FindStr/Grep like tool

Usage:   RXGREP  filename  pattern  [ options ]
or:      command | RXGREP  pattern  [ options ]

Where:   filename   is the file to be filtered
         command    is the command whose standard output is to be filtered
         pattern    is the search pattern (regular expression)

Options: /F:nn      search only the First nn bytes
         /I         case Insensitive search
         /S:nn      Skip the first nn matches
         /T:nn      Take only nn matches

Example: ROBOCOPY D:\sourcedir E:\targetdir /NP /MIR |
         RXGREP "\s+\d+\s+D:\\sourcedir\\[^\n\r]*\r\n([^\n\r\\]+\r\n)+"
         (to be read as a single command line) will return something like:
                         125    D:\sourcedir\subdir\
            New File                 342        brandnewfile.ext
            Newer                  4.06m        updatedfile.ext
          *EXTRA File              2.40m        deletedfile.ext

Notes:   If /F:nn is used and a file is specified, only the first nn bytes
         of that file will be read; if the input is redirected, it is read
         entirely, and then chopped to nn bytes before being searched.
         Return code ("errorlevel") will be 1 in case of (command line)
         errors or if no match was found, otherwise 0.
         This version of the program requires .NET Framework 4.5.

Written by Rob van der Woude
http://www.robvanderwoude.com

page last uploaded: 2018-02-15, 10:51