bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: grep recursive problem


From: dan1
Subject: Re: Fw: grep recursive problem
Date: Fri, 20 Oct 2006 21:30:26 +0200

dan1 scripsit:

However, I would like to ask it to you all seriously, don't you think that we should consider doing something to grep so that people can use the first
command I suggested (grep -r i80word *.php) to get the same result?

What you ask for is impossible.  Grep never sees the "*.php", because Unix
shells (unlike DOS and Windows ones) automatically expand that to the
names of files in the current directory ending in ".php".  What happens
if there are no such files depends on the shell: csh and tcsh report errors by default, others pass through the unaltered "*.php", which is interpreted
by grep as an actual file name.


Hello, John.

Ok, thank you for this information, I will go then with this very satisfying suggestion from Eli Zaretskii:
grep -r -i i80word * --include="*.php"

However, could someone add this example to the man page of grep. I really think that many people will have the same problem and adding it to the example section at the end would just make others not have the same problem than I had and will help linux beginners easily reach their goal to find text in specific file name extensions.

Thanks in advance, and also to everyone for the help provided.

Daniel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]