【发布时间】:2014-08-03 12:47:01
【问题描述】:
我正在关注How do I find all files containing specific text on Linux? 上的最佳答案以在我的项目中搜索字符串。
这是我的命令grep --include=*.rb -rnw . -e "pattern"
Zsh 告诉我zsh: no matches found: --include=*.rb
grep 好像不支持--include 选项。
当我输入grep --help 时,它会返回
usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
这里没有--include。
我的 grep 版本是否太旧?还是我的命令有问题?
【问题讨论】: