fs-grep
Contents of the file grep
Cli
# install [sudo] npm install -g fs-grep # pattern => 需要匹配的内容,如果有空格需要使用引号包裹 # files => 以glob的方式,比如"./**/*"、"./**/*.ext"等 fs-grep <pattern> [files] # 例子:查找当前目录下的包含所有test的文件 fs-grep test # 例子:查找所有.md fs-grep test "./**/*.md" # 例子:搜索词高亮 fs-grep --color test
Api
使用npm install fs-grep
安装
.exec
var read = fsGrep; read; read;