Alternatively use backticks ... grep <options> <grepstring> `some find, ls, locate, etc. statement here`
e.g. grep -E 'foo|bar' `locate .java | grep someproject` grep -liP 'FIXME:*(serious|critical|fatal)*' `ls /some/dir/*.php` On Wed, 2005-04-06 at 21:36, Federico Sevilla III wrote: > On Wed, Apr 06, 2005 at 09:11:10PM +0800, Eduardo Tongson wrote: > > > I want to know what tools are available on Linux that allows me to > > > find files which contain a certain string on a directory full of > > > source codes (possibly one that uses grep). Thanks! > > > > find + xargs + grep > > ex. > > find /home/shae/src -type f -print | xargs grep -i [strings] > > Hrmm... how about > > $ grep -lr 'PornAdminDotNet' /home/shae/src/* > > ? That returns a list of matching files, but can be tweaked to show > matching lines and the matching files (remove 'l'). > > --> Jijo -- Philippine Linux Users' Group (PLUG) Mailing List plug@lists.q-linux.com (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie