【发布时间】:2012-05-24 01:15:24
【问题描述】:
当我想 grep 某个目录中的所有 html 文件时,我会执行以下操作
grep --include="*.html" pattern -R /some/path
效果很好。问题是如何grep某个目录下的所有html,htm,php文件?
从这个Use grep --exclude/--include syntax to not grep through certain files看来,我可以做到以下几点
grep --include="*.{html,php,htm}" pattern -R /some/path
但遗憾的是,它对我不起作用。
仅供参考,我的 grep 版本是 2.5.1。
【问题讨论】: