bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: grep 2.4.2 -r option broken


From: Paul Jarc
Subject: Re: grep 2.4.2 -r option broken
Date: Wed, 15 May 2002 18:16:57 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu)

"King, Steven R" <address@hidden> wrote:
> grep -r "struct timeval" *.h

Wildcard expansion is performed by the shell; -r is handled by grep,
but only applies to whatever arguments are given to it by the shell.
In this case, the shell expands *.h to a list of all header files in
the current directory, and passes those to grep.  grep would recurse
on those, since -r was given, but none of them are directories.  This
will do what you want:
find . -name '*.h' | xargs grep "struct timeval" /dev/null


paul



reply via email to

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