[Top][All Lists]

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

Re: grep recursive problem

From: Stepan Kasal
Subject: Re: grep recursive problem
Date: Fri, 27 Aug 2004 16:40:02 +0200
User-agent: Mutt/1.4.1i


On Fri, Aug 27, 2004 at 08:35:28AM -0400, address@hidden wrote:
> C:\Visual Studio .NET 2003\Vc7>grep --recursive WM_PAINT *.h
> grep: *.h: Invalid argument

this searches for *.h in current dir.  There is no such file.

> grep --recursive WM_PAINT *.h

This doesn't search subdirectories.

What you need is
        grep --recursive --include=*.h WM_PAINT

The --include option is available in GNU grep version 2.5 and newer,
so you have to upgrade.

The explanation is that grep comes from UNIX.  On UNIX, wildcards (*.h)
are expanded by the shell _before_ grep is called.
DOS ports of grep emulate this behaviour on Win.

> ----------------------------------------------------
> ----------------------------------------------------
> The information in this email, including attachments, may be confidential

Nonsense.  Your mail is now in a public archive.

The text of this mail is confidential. If you read it, pay me
thousand bucks as a fine!

        Stepan kasal

reply via email to

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