Nomen Posted April 5, 2013 Share Posted April 5, 2013 (edited) 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 April 5, 2013 by Nomen Link to comment Share on other sites More sharing options...
Commodore Posted April 5, 2013 Share Posted April 5, 2013 You can use the wildcards if you using FIND in couple with command FOR Link to comment Share on other sites More sharing options...
submix8c Posted April 5, 2013 Share Posted April 5, 2013 Googlegnu grep dos downloadhttp://www.resoo.org/docs/dos/free_software/txtutil1.htm#grep Link to comment Share on other sites More sharing options...
CharlotteTheHarlot Posted April 6, 2013 Share Posted April 6, 2013 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-DOShttp://www.sac.sk/files.php?d=16&l=Uftp://ftp.sac.sk/pub/sac/utilmisc/uutil.zipFgrep.exe 12,837 1998-07-03 00:05MS-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. e-mail: george2@lightlink.com web site: http://www.lightlink.com/george2/DJGPP Port of GNU Fileutile 4.1, release 7 ... page ... fileDJGPP Port of GNU Fileutile 4.1, release 6Egrep.exe 66,560 1996-10-06 23:13Fgrep.exe 43,520 1996-10-06 23:13Ggrep.exe 66,560 1996-10-06 23:13usage: 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 7http://compgroups.net/comp.os.msdos.djgpp/announce-release-7-of-djgpp-port-of-fileu/1424981The Fileutils port is available here:ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/fil41b.zip (binaries)ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/fil41d.zip (docs)ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/fil41s.zip (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 http://oakroadsystems.comgrep: This is the unregistered evaluation version. or visit http://oakroadsystems.com/sharware/ . Program Dated 13 Jan 2003 / Document Dated 13 Jan 2003 Copyright © 1986-2003 Stan Brown, Oak Road Systems <http://oakroadsystems.com/sharware/grep.htm>.Grep16.exe 60,700 2003-01-13 13:07Grep32.exe 156,672 2003-01-13 13:07Grephist.htm 29,632 2003-01-13 12:05Grephist.txt 24,473 2003-01-13 13:16Grepref.htm 165,522 2003-01-13 11:59Grepref.txt 128,796 2003-01-13 13:16Grepsb.xml 6,872 2003-01-13 13:16Grepuser.htm 58,977 2003-01-13 11:59*** UPDATE: GREP Release 8.0http://oakroadsystems.com/sharware/grep.htmhttp://oakroadsystems.com/sharware/8GZUtTSi6BVRuzz9UK/grep80.zip[intelligence Services] Greppe Text Tools Release 3.0 ... page ... file[intelligence Services] Greppe Text Tools Release 2.4Fgreppe.exe 51,788 2002-09-25 10:23Pdgreppe.def 2,443 2002-09-25 10:23Pdgreppe.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,GPO Box 9/ADELAIDE S.A. 5001/AUSTRALIAPDGREPPE V1.74b 24 Sep 2002Pattern Definition GREP with Pattern EditingA pattern matching tool for locating / changing data in files.Intelligence Services/GPO Box 9/Adelaide SA 5001/AUSTRALIACopyFree © 1987-2002 (1407-1422 A.H.)Usage: pdgreppe [Options|@OptionFile] Pattern FileNames***UPDATE: GREPPES TEXT TOOLS Release 3.0 (399KB)http://isvs.tripod.com/http://isvs.tripod.com/zips/isgtt30x.zip[Gerald M. Vrooman] [Chenango Shoreware] SGREP DosNix v2.4c ... page ... file[Gerald M. Vrooman] [Chenango Shoreware]http://cd.textfiles.com/jcs/bestbestzips/HTML/11450/DOSNIX.HTMhttp://cd.textfiles.com/jcs/bestbestzips/FileUtil/dsx24c.zipSgrep.exe 14,528 1997-01-04 05:05 Gerald M. Vrooman 6400 NY RT 79 Chenango Forks, NY 13746SGREP Search file(s) for string.DOSNIX Ver. 2.4cCopyr. 1991,1997 by G. Vrooman. All rights reserved.USAGE: sgrep [-chilnv] string file1...filen (stdout) | sgrep [-cinv] string sgrep -echilnv (reg exp) file1..filenOPTIONS: -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.03http://www.freedos.org/software/?prog=xgrephttp://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/file/xgrep/xgrp103s.ziphttp://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/file/xgrep/xgrp103x.zipXgrep.com 3,380 1994-06-17 01:03Xgrep.doc 25,545 1994-06-17 01:03Robert Nordierrnordier@iafrica.comPO Box 11266Marine Parade4056South Africaxgrep Version 1.03 Copyright © 1994 Robert NordierUsage: XGREP [-chlnsvyorx] expression [file ...]Options: -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 matchSyntax: ^ 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 timesClasses: :a alpha :c cntrl digit :g graph :l lower :n alnum punct :s space :t print :u upper :x xdigit :z ascii Link to comment Share on other sites More sharing options...
submix8c Posted April 6, 2013 Share Posted April 6, 2013 DJGPP "DOS GREP" you provided is new version. I didn't bother going further than what I gave just to satisfy the OP. It's clear that "Delorie" is the author of the Port I provided. Within the link is -http://www.resoo.org/docs/dos/free_software/progrmg.htm#djgppSo, now the OP has many options. Link to comment Share on other sites More sharing options...
Yzöwl Posted April 6, 2013 Share Posted April 6, 2013 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now