Re: GREP Unix command

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



There is a DOS 'grep' from way back in the '80s where there was a library of
many standard UNIX comands for DOS. Each time I get a new computer the first
thing I do is download all the programs. Here is the "grep /?" response:

Name: grep - regular expression search through files
Usage: grep [ -vclins? ] <pattern> file1 ...
Version: 2.0 for PCs with DOS 2.1 and higher
(C) Copyright Peter Stephen Heitman 1986 -- All Rights Reserved
Distributed with the PiCnix Package (tm) by Peter Stephen Heitman
Regular expression pattern matching algorithm:
Copyright (c) 1986 by University of Toronto.
Written by Henry Spencer. Not derived from licensed software.

The options for grep are:

-v: print the lines that DON'T match the pattern
-c: print a count of the number of matches in each file
-l: print the name of each file that has a match
NOTE: options v, c and l are exclusive. Only one of these may be selected

-i: ignore the case of each character while matching
-n: print the line number that the match occurred on
-s: do not report errors encountered while opening or reading files
-?: print this description of the program.

The 'PiCnix Package (tm)' can be downloaded from
http://sourceforge.net/project/showfiles.php?group_id=41329.

Frank


"Kamlesh" <Kamlesh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0FE58CA1-601B-4624-8358-FC52D7C55C63@xxxxxxxxxxxxxxxx
Whats the Unix GREP command equivalent in Windows?
Is there any alternative command which can be used like GREP?

I am looking for a Microsoft inbuilt solution instead of installing any
third-party tools.

Please advice.


.



Relevant Pages

  • Re: IDEs
    ... attempt to provide implementations of all core UNIX programs ... This allows greater portability between UNIXes, ... For grep, I took the tcgrep program, created a DOS batch wrapper using ...
    (comp.lang.perl.misc)
  • Re: Extract Data With DOS
    ... I have a large file with millions of records and I have to clean it ... Can this be done in DOS? ... This is best handled with a 'grep' utility: ... grep -v ^XYZ oldfile> newfile ...
    (comp.os.msdos.programmer)
  • Re: an off topic question
    ... > in other words the VALUE of grep NOTE *.txt to be equal to the variable var. ... Don't know about DOS, but with an sh-compatible shell you would do: ... For a POSIX compliant shell it could be: ...
    (comp.unix.shell)
  • Re: Hidden Folders
    ... Subject: Hidden Folders ... If you have a DOS version of "grep" you can save yourself quite a bit of work with... ... >On the command prompt ...
    (Vuln-Dev)