On 01/05/2010 06:36 PM, Asis Hallab wrote:
Good day!The following example should explain it: # First grep returns no result. : grep -lr "oligarchy" *.txt # Second one ignoring the txt-file-pattern, does!: ~/Documents$ grep -lr "oligarchy" *tmp/test.txt
This is not how grep -r works. In the first case, grep -r looks for "*.txt" in the current directory only.
What you want is grep --include=*.txt -lr oligarchy . Paolo
