[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: 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:

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:


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

reply via email to

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