How to recursively grep the pattern inside the directory?

8k Views Asked by At

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

2

There are 2 best solutions below

0
On BEST ANSWER
grep "student_[[:alnum:]]*\.tcl" *
4
On

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