Terminal 带有文件掩码的egrep

Terminal 带有文件掩码的egrep,terminal,grep,Terminal,Grep,如何更改此命令以仅搜索底层目录结构中的.tpl和.php文件 egrep "\[#([^]])+#\]|_t?\(([^\)])+\)|\{_t ([^\}])+\}" . -RohiIs | sort | uniq 使用,例如 $find\(-name\*.tpl-o-name\*.php\)-exec egrep{}\|排序| uniq

如何更改此命令以仅搜索底层目录结构中的.tpl和.php文件

egrep "\[#([^]])+#\]|_t?\(([^\)])+\)|\{_t ([^\}])+\}" . -RohiIs | sort | uniq
使用,例如

$find\(-name\*.tpl-o-name\*.php\)-exec egrep{}\|排序| uniq