How to recursively grep the pattern inside the directory?

ε祈祈猫儿з 提交于 2021-01-03 08:45:41

问题


I would like to grep all string patterns which are start with the: student_ , then any numbers of symbols(letters and digits) and end with the .tcl


回答1:


grep "student_[[:alnum:]]*\.tcl" *



回答2:


If you're using vim 7, it comes with a build in grep function that puts the result in a quicklist-window.

try

:vimgrep /^student_/ **/*.tcl

** makes the search recursivelly

To search in current directory only, use:

:vimgrep /^student_/ *.tcl

read more @ vim.wikia.com



来源:https://stackoverflow.com/questions/15949101/how-to-recursively-grep-the-pattern-inside-the-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!