home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / bzgrep20.zip / grep.txt < prev   
Text File  |  1994-11-02  |  3KB  |  96 lines

  1. There has always been some things about GREP that I needed
  2. that I didn't have... So I decided to apply myself and using
  3. Borland C++ and some OO stuff put together my own version.
  4.  
  5. The only thing missing from this version which will be in
  6. the next one is the support for unix-type regular
  7. expressions...
  8.  
  9. The specific capabilities I longed for include recursive
  10. search through sub-directories...
  11.  
  12. Being able to edit the files found by grep (have grep throw
  13. you in edit on them)...
  14.  
  15. Being able to copy the files found to another sub-directory
  16. keeping the "tree structure" in tact...
  17.  
  18. Full support for HPFS...
  19.  
  20. So here is the help that comes out if you leave off the
  21. parameters....
  22.  
  23. All disclaimers apply... (e.g. Use it at your own risk... I
  24. am releasing this version as freeware but retain the
  25. copywrite) etc... Enjoy
  26.  
  27. bobzim@mcs.com (Bob Zimmerman)
  28.  
  29.  
  30. Syntax:  GREP options string wildcard /COPY=<directory> /EDIT=<editor>
  31.  
  32. Options can be: 
  33.   -i   Ignore Case 
  34.   -f   File Names Only - No matched lines
  35.   -r   Recursive (all sub-directories) 
  36.   -n   Include Line Numbers 
  37.   -t   File Names Only - no total lines
  38.   -b   Ignore Binary Files (OBJ, DLL, EXE, LIB)
  39.   -x   Use Unix Regular Expressions (ignore -i)
  40.  
  41.   /EX=<command>
  42.        After each matching file, prompts the user if the
  43.        specified command should be run against the file.
  44.        For example
  45.        /EX=EPM
  46.        prompts if the epm editor should edit the file.
  47.        You can "embed spaces" by surrounding the entire string
  48.        with quotes. For example
  49.  
  50.        grep include *.cpp "/ex=start epm"
  51.  
  52.        will "start epm" in a separate window.
  53.        Prior to running the "command"... any %f is translated to
  54.        the file name. %d is the directory name. %l is the line number
  55.        the first match was found on. %c is the column number
  56.        the first match was found on.
  57.  
  58.    GREP_EX environment variable can be set to a command you use over
  59.        and over. So you can place your most often using /ex command
  60.        in this environment variable in config.sys. To turn on
  61.        the command specify /EX (without = sign).. For example:
  62.  
  63.        grep include *.cpp /ex
  64.  
  65.        It will use the environment variable. You can override the
  66.        environment variable by using the /ex= command:
  67.  
  68.        grep include *.cpp "/ex=xcopy %f backup\*.* /v /e /s"
  69.  
  70.        The above causes the GREP_EX environment variable to be
  71.        ignored.
  72.  
  73.  
  74. Examples : 
  75.    GREP include *.cpp 
  76.        Search for word include in all CPP 
  77.  
  78.    GREP -irf xhandle *.?pp     or 
  79.    GREP -i -r -f xhandle *.?pp 
  80.        Search for xhandle in all files ending 
  81.        with PP (hpp, cpp, xpp) and search all 
  82.        sub-directories as well. Only show the 
  83.        file names that match (no text).       
  84.  
  85. Version 1.5
  86.         Added Regular Expressions
  87.  
  88. Version 1.6
  89.         No longer requires c215.dll
  90.  
  91. Version 2.0
  92.         Has dos version of exe along with support for the /EX
  93.         parameter. /EDIT and /COPY are still supported for
  94.         compatability but you should use /EX now.
  95.  
  96.