GREP is a well known tool in the unix environment. There are several ports available that I came across for Windows. However, NONE of them allowed me to search through subdirectories (this functionality is easy on unix using the shell's file manipulation tools). I modified GNU grep 2.0 to allow searching of subdirectories.
To search subdirectories, do something like this:
grep -S "searchtext" *.txt
grep -S "searchtext" \personal\files\*.txt
grep -S searchtext C:\*.*
The most recent version I compiled is GREP20d_WIN.ZIP. It was released on January 26, 2001.
Revisions (Jan 26, 2001)
2.0b Fixed display of filenames (-h option, as well as decision to print them based on number of files being checked)
2.0c Fixed display of paths if the "-l" option was used with wildcards
2.0d Jan 26, 2001
Fixed display of paths if the "-c" option was used with wildcards
Changed code to accept standard in from piped output. With earlier versions, the "-" was required to expicitly indicate that redirection was being used.
Note
Versions before 2.0d did not work well with redirection, such as:
dir *.* /sub | grep -i DLL | more
This will nearly always cause a crash with versions of grep/windows before 2.0d. In these cases, use explicit rediretion, or upgrade to version 2.0d. The explicit redirection syntax is:
dir *.* /sub | grep -i DLL - | more
This page has been accessed
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
使用例子: grep -S "searchtext" *.txt grep -S "searchtext" \personal\files\*.txt grep -S searchtext C:\*.* dir *.* /sub | grep -i DLL | more 原文链接:http://www.interlog.com/~tcharron/grep.html
资源推荐
资源详情
资源评论
收起资源包目录
grep20d_win.zip (35个子文件)
getpagesize.h 741B
getopt.c 20KB
obstack.h 18KB
getopt.h 4KB
grep.c 25KB
grep.exe 101KB
Makefile.watcom 1KB
regex.c 159KB
MANIFEST 1KB
obstack.c 14KB
alloca.c 13KB
kwset.c 21KB
grep.man 8KB
tests
khadafy.regexp 66B
khadafy.lines 728B
scriptgen.awk 280B
check.sh 530B
spencer.tests 2KB
regex.h 18KB
kwset.h 2KB
grep.txt 8KB
README.W32 3KB
README 1KB
INSTALL 5KB
dfa.c 62KB
AUTHORS 1KB
dfa.h 14KB
ggrep.man 8KB
NEWS 2KB
ChangeLog 88B
search.c 11KB
COPYING 18KB
grep.h 1KB
PROJECTS 684B
readme.txt 1KB
共 35 条
- 1
资源评论
勤奋专注
- 粉丝: 76
- 资源: 38
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功