On 10/09/10 01:42, Eric Blake wrote:
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
[...]
Also, David A. Wheeler has written a couple of essays in the past
couple of years talking about the hazards of shell filename globbing
in the face of complicated filenames containing spaces, leading
dashes and/or control characters, and looks at the strengths and
weaknesses of various methods for dealing with the situation:
- "Filenames and Pathnames in Shell: How to do it correctly":
http://www.dwheeler.com/essays/filenames-in-shell.html
- "Fixing Unix/Linux/POSIX Filenames: Control Characters (such as
Newline), Leading Dashes, and Other Problems":
http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html
David's blog is at:
http://www.dwheeler.com/blog/
cheers,
behoffski