bug-grep
[Top][All Lists]
Advanced

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

Filenames and Pathnames in Shell (was Re: bug in grep)


From: behoffski
Subject: Filenames and Pathnames in Shell (was Re: bug in grep)
Date: Sat, 09 Oct 2010 03:42:36 +1030
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3

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



reply via email to

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