Sign in to follow this  
Followers 0

Is there a grep command for win-98 DOS?

6 posts in this topic

I was looking for something that would function similar to the unix "grep" command, and I'm finding that there appears to be a "DOS" command -> findstr, but that is not a valid command when you open a DOS window from win-98 (for what version of windows is there a shell findstr command??). Anyone know if there is a "grep.exe" or "findstr.exe" for dos?

Edit: Apparently there is a "findstr.exe" on XP, but that file is linked to some function in ntdll.dll related to ansi strings that win-98 doesn't have.

There is a find.exe that apparently does function soft-of like grep - except that it doesn't take wild-cards (like *.log) for filespec. Findstr on XP does take wildcards for filespec.

Edited by Nomen

Share this post

Link to post
Share on other sites

You can use the wildcards if you using FIND in couple with command FOR


Share this post

Link to post
Share on other sites

After searching through my DOS Batch folder I turned up a couple 3rd party utilities, and amazingly they all still have working links! In the "spoiler" I put a short rip from the diz or readme to give you an idea of their date and status.

[George Gesslein II] Unix-Like Utilities for MS-DOS ... page ... file

[George Gesslein II] Unix-Like Utilities for MS-DOS
Fgrep.exe 12,837 1998-07-03 00:05
MS-DOS 'fgrep' Copyright © 1997 George Gesslein II.
Usage: FGREP.EXE [-invh] pattern [filenames]
The '-i' option will cause a case insensitive search.
The '-n' option precedes each line with its line number in the file.
The '-v' option displays lines only if they don't contain 'pattern'.
The '-h' option suppresses filename display.
'pattern' may be enclosed in double quotes.
web site:

DJGPP Port of GNU Fileutile 4.1, release 7 ... page ... file

DJGPP Port of GNU Fileutile 4.1, release 6
Egrep.exe 66,560 1996-10-06 23:13
Fgrep.exe 43,520 1996-10-06 23:13
Ggrep.exe 66,560 1996-10-06 23:13
usage: egrep [-CVbchilnsvwx] [-<num>] [-AB <num>] [-f file] [-e] expr [files]
Usage: fgrep [-[AB]<num>] [-[CVchilnsvwx]] [-[ef]] <expr> [<files...>]
usage: ggrep [-CVbchilnsvwx] [-<num>] [-AB <num>] [-f file] [-e] expr [files]
*** UPDATE: DJGPP Port of GNU Fileutile 4.1, release 7
The Fileutils port is available here: (binaries) (docs) (sources)

[Oak Road Systems] [stan Brown] GREP Release 8.0 ... page ... file

[Oak Road Systems] [stan Brown]
grep32 7.2 Copyright 1986-2003 Oak Road Systems
grep: This is the unregistered evaluation version. or visit .
Program Dated 13 Jan 2003 / Document Dated 13 Jan 2003
Copyright © 1986-2003 Stan Brown, Oak Road Systems
Grep16.exe 60,700 2003-01-13 13:07
Grep32.exe 156,672 2003-01-13 13:07
Grephist.htm 29,632 2003-01-13 12:05
Grephist.txt 24,473 2003-01-13 13:16
Grepref.htm 165,522 2003-01-13 11:59
Grepref.txt 128,796 2003-01-13 13:16
Grepsb.xml 6,872 2003-01-13 13:16
Grepuser.htm 58,977 2003-01-13 11:59
*** UPDATE: GREP Release 8.0

[intelligence Services] Greppe Text Tools Release 3.0 ... page ... file

[intelligence Services] Greppe Text Tools Release 2.4
Fgreppe.exe 51,788 2002-09-25 10:23
Pdgreppe.def 2,443 2002-09-25 10:23
Pdgreppe.exe 82,573 2002-09-25 10:23
GreppeTextTools Release 2.4,
*********Search(GREP)/Replace for PC's,
PDGREPPE Search Edit by MAGIC patterns,
(Extended Regular Expressions),
FGREPPE Search Edit by fixed pattern,
(Very Fast),
(Many Options),
README GREPPES TextTools On-line Manual,
Intelligence Services,
PDGREPPE V1.74b 24 Sep 2002
Pattern Definition GREP with Pattern Editing
A pattern matching tool for locating / changing data in files.
Intelligence Services/GPO Box 9/Adelaide SA 5001/AUSTRALIA
CopyFree © 1987-2002 (1407-1422 A.H.)
Usage: pdgreppe [Options|@OptionFile] Pattern FileNames

[Gerald M. Vrooman] [Chenango Shoreware] SGREP DosNix v2.4c ... page ... file

[Gerald M. Vrooman] [Chenango Shoreware]
Sgrep.exe 14,528 1997-01-04 05:05
Gerald M. Vrooman
6400 NY RT 79
Chenango Forks, NY
SGREP Search file(s) for string.
DOSNIX Ver. 2.4c
Copyr. 1991,1997 by G. Vrooman. All rights reserved.
USAGE: sgrep [-chilnv] string file1...filen
(stdout) | sgrep [-cinv] string
sgrep -echilnv (reg exp) file1..filen
OPTIONS: -c Print only a count of matching lines.
-e Treat argument as a regular expression.
-h Do not print file names.
-i Ignore differences between upper and lower case.
-l Print only the names of files with matching lines.
-n Print line numbers of matching lines.
-v Print only lines that don't match.
-? Display this screen.

[Robert Nordier] FreeDos Xgrep v1.03 ... page .... file1 .... file2

[Robert Nordier] Xgrep v1.03 3,380 1994-06-17 01:03
Xgrep.doc 25,545 1994-06-17 01:03
Robert Nordier
PO Box 11266
Marine Parade
South Africa
xgrep Version 1.03 Copyright © 1994 Robert Nordier
Usage: XGREP [-chlnsvyorx] expression [file ...]
-c Line count only -r Recursively search subdirectories
-h No file names -s Silent about inaccessible files
-l File names only -v Non-matching lines
-n Number lines -x No magic: all operators need \
-o Errors to stdout -y Case-insensitive match
^ start of line repeat: * 0 or more times
$ end of line + 1 or more times
. wildcard ? 0 or 1 times
[] character class \{m\} m times
[^] inverse class \{m,\} m or more times
\ quote next character \{m,u\} m to u times
:a alpha :c cntrl :D digit :g graph
:l lower :n alnum :P punct :s space
:t print :u upper :x xdigit :z ascii


Share this post

Link to post
Share on other sites

Additionally, if you let us know what it is you are trying to do we may be able to provide you with a solution from the console directly.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.