博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[转]GREP for Windows
阅读量:5046 次
发布时间:2019-06-12

本文共 1550 字,大约阅读时间需要 5 分钟。

http://www.interlog.com/~tcharron/grep.html

A very flexible grep for windows

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 . 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

&ft=6&frgb=snow&md=6&pad=Y&dd=AA"> -->

times since November 17, 1997.

转载于:https://www.cnblogs.com/horizonli/p/grep.html

你可能感兴趣的文章
oracle数据类型
查看>>
socket
查看>>
Vue中使用key的作用
查看>>
二叉索引树 树状数组
查看>>
日志框架--(一)基础篇
查看>>
Java设计模式之原型模式
查看>>
Spring学习(四)-----Spring Bean引用同xml和不同xml bean的例子
查看>>
哲理故事与管理之道(20)-用危机激励下属
查看>>
关于源程序到可运行程序的过程
查看>>
wepy的使用
查看>>
数值函数ROUND(四舍五入),TRUNC(不四舍五入),MOD
查看>>
Android端百度地图API使用详解
查看>>
NavigationBar设置
查看>>
IO端口和IO内存的区别及分别使用的函数接口
查看>>
自定义的JavaScript定时器
查看>>
smarty对数组进行json_encode
查看>>
Django model 字段类型及选项解析(二)
查看>>
《Linux命令行与shell脚本编程大全》第十四章 处理用户输入
查看>>
189. Rotate Array 从右边开始翻转数组
查看>>
用wget命令下载jdk
查看>>