[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in grep
From: |
Eric Blake |
Subject: |
Re: bug in grep |
Date: |
Fri, 08 Oct 2010 09:12:51 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4 |
On 10/08/2010 03:39 AM, Piotr Karkuciński wrote:
Hi,
I find bug in grep.
I create directory "--help"
Next I use command: grep -R "any string" *
and grep print help. Grep use directory name --help as parameter.
Thanks for the report. However, this is not a bug. See this related
FAQ on the coreutils project:
http://www.gnu.org/software/coreutils/faq/#I-have-a-file-called-_003csamp_003e_003cspan-class_003d_0022option_0022_003e_002d_002dhelp_003c_002fspan_003e_003c_002fsamp_003e_002e-How-do-I-remove-it_003f
Use either one of these alternatives instead:
grep -R "any string" ./*
grep -R "any string" -- *
Or, for that matter, since * in a large directory may exceed command
line length limits on many OS, you may even want to consider using:
grep -R "any string" .
although that will also visit hidden dot-files in the current directory.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
- bug in grep, Piotr Karkuciński, 2010/10/08
- Re: bug in grep,
Eric Blake <=