grep is always recursive

Hal Burgiss hal at burgiss.net
Tue Jan 27 22:27:43 UTC 2009


On Tue, Jan 27, 2009 at 05:45:35PM -0300, Lorenzo Luengo wrote:
> mv ./-r ./.-r
> 
> $ grep "lala" *
> $
> 
> Nothing.
> 
> The problem comes from the bash * expansion that makes grep see that 
> filename as an option. Is it a bash problem? Is it a grep problem?? 
> Don't know...
> 
> Should it be reported to anyone?

At the least I'd say there is a documentation bug that shows options
clearly coming before filenames. And it is worth documenting that if
the intended behavior is for filenames expanded from the shell to be
interpreted as options. Those both strike me as grep issues. 

-- 
Hal





More information about the ubuntu-users mailing list