[comp.unix.microport] grep for MS-DOS

louie@rruxi.bae.bellcore.com (Paul Louie) (07/13/90)

> Subject: grep and sort for a PC
> Message-ID: <1990Jul12.165841.1643@elroy.jpl.nasa.gov>
> Date: 12 Jul 90 16:58:41 GMT
> Sender: news@elroy.jpl.nasa.gov (Usenet)
> Reply-To: pjs@aristotle.jpl.nasa.gov
> Followup-To: poster
> Organization: Jet Propulsion Laboratory, NASA/Caltech
>
> Hi there. I hope I've got the right newsgroup(s) for this question: a friend
> of mine who has a PC wants programs to do generalized sorting and searching,
> so I figured grep and sort would fit the bill.  I doubt that he wants to
> change from MSDOS to Unix just to get this capability, so can anyone refer
> me to a source of these programs running under MSDOS?
>
> Please e-mail replies; I'm not a PC person myself.
>
> This is news.  This is your       |    Peter Scott, NASA/JPL/Caltech
>brain on news.  Any questions?    |    (pjs@aristotle.jpl.nasa.gov)

If I understand your question correctly.  You want to do "grep" like function
in MS-DOS right?  The command is FIND, but unlike grep it can't be entered on
its own.  It can only be used when it is piped to.  Here are the examples:

1) Want to know all batch files on the system (files that has "bat" as extension

	dir *.bat | find ".bat"

2) List all directories:

	dir |find "<DIR>"

3) List all lines in a file that has the word apple:

	type filename |find "apple"

par@hq.af.mil (Paul.A.Reitelbach) (07/14/90)

The copy if Turbo C I have came with grep, and it works just like grep
in Unix.  It is copyrighted software but this is what you are looking
for.

-- 
Paul Reitelbach                     *     I like life. 
Computer Programmer/Analyst         *     It's something to do. 
United States Air Force Civilian    * 
Pentagon, Washington, D.C.          *             Ronnie Shakes