I use the following command for such things, which is good not only for
scanning ALL the files in a directory tree, but for any list of files:
(this example demonstrates how to find all the C files in the current
diretory and its sub directories that contain the word "kuku"):
find . -name "*.[ch]" ! -type d -exec grep -H -i kuku {} \;
Notes:
======
1. In this specific example, the "! type d" is not needed (unless you
call your directories "*.c"...), but it's a good practice to add it
always.
2. The "-H" is needed because otherwise grep can't know that its output
is mixed with the output of other grep's with other filenames, and
thinks that there is only one file so there is no reason to print
its name.
The following command edit all these files, one by one:
vi `find . -name "*.[ch]" ! -type d -exec grep -l -i kuku {} \;`
Note:
=====
There is a lower case 'L' instead of the upper case 'H'.
--
Eli Marmor
[EMAIL PROTECTED]
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.: +972-9-766-1020 8 Yad-Harutzim St.
Fax.: +972-9-766-1314 P.O.B. 7004
Mobile: +972-50-23-7338 Kfar-Saba 44641, Israel
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]