The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

How to grep through all modules and include files in the Drupal code base

Submitted by nk on Wed, 2007-10-10 19:16

grep LOWER modules/*/*.{module,inc} includes/*inc

Add themes, sites/all etc as needed. The interesting trick is the {}.

Commenting on this Story is closed.

Submitted by bjaspan on Wed, 2007-10-10 22:25.

I prefer grep -r search_text . which searches all files and folders from the current directory downwards. For your example, you could use grep -r LOWER modules includes.

Submitted by nk on Wed, 2007-10-10 23:15.

If you are keeping your source in SVN this will churn out a ton of files in .svn dirs. You can always put a | grep -v \.svn after it, of course. Also, in case you have programming documentation, backup files etc in your dirs then you will also get a ton of false positives.

Submitted by Anonymous on Tue, 2009-09-15 14:53.

man grep can do a magic

------
JJm
Custom written Buy Essay - Buy Term papers - Buy Report custom writing service providing custom written papers.

Submitted by harry slaughter... on Fri, 2007-10-12 05:23.

I use cscope, which indexes whatever files you want and leaves you at a sort of search prompt.

After searching, you can select any of the results and immediately open the file to that line.

It's super fast.

It's native to *nix and can be built for windows using cygwin.

See a screenshot

Submitted by nk on Tue, 2007-10-23 11:54.

Thanks, it works great. I needed to do

find . -name \*module >>cscope.files
find . -name \*inc >>cscope.files
find . -name \*php >>cscope.files
find . -name \*engine >>cscope.files
find . -name \*theme >>cscope.files

to prepare, but once this is done it's truly useful. Thanks!