windows的grep命令Select-String

喜欢用linux的grep命令查找文件内容,用起来很方便,windos是否也有grep命令呢?

在powershell中,提供了Select-String命令搜索文件内容

  • 通常用法
select-string -Pattern "Keyword"  -Path *.log
select-string "Error" *.log
  • 忽略大小写
select-string "Error" *.log -casesensitive
  • 多个关键词
select-string keyword1,keyword2 *.log
  • 递归查找
Get-ChildItem -include *.log -recurse |select-string keyword

此生必看的科学实验
https://v.qq.com/x/page/d01080hy2fc.html

精神病为什么治不好(上集)
https://v.qq.com/x/page/h0359zvupc0.html
精神病为什么治不好(下集)
http://v.qq.com/x/page/r0359ofw4vh.html

百病之源(上集)
https://v.qq.com/x/page/o0359x7oy11.html
百病之源(中集)
https://v.qq.com/x/page/u03599t5a4m.html
百病之源(下集)
https://v.qq.com/x/page/u0359ufehhh.html

净土大经科注2014
http://pan.baidu.com/s/1gfaHvwv

posted @ 2017-06-18 10:51  妙音  阅读(414)  评论(0编辑  收藏  举报