Path: utzoo!attcan!uunet!midway!ncar!asuvax!cs.utexas.edu!rutgers!bellcore!rruxi.bae.bellcore.com!louie From: louie@rruxi.bae.bellcore.com (Paul Louie) Newsgroups: comp.unix.microport Subject: grep for MS-DOS Message-ID: <25308@bellcore.bellcore.com> Date: 13 Jul 90 14:19:58 GMT Sender: news@bellcore.bellcore.com Reply-To: louie@rruxi.bae.bellcore.com (Paul Louie) Organization: Bell Communications Research Lines: 34 > 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 "" 3) List all lines in a file that has the word apple: type filename |find "apple"