grep is always recursive

Derek Broughton derek at
Fri Jan 30 00:46:20 UTC 2009

Loïc Grenié wrote:

> 2009/1/29 Lorenzo Luengo <lluengo at>:
>> This makes me think of those poor bash script developers that don't know
>> which filenames they will be handling... I think that a good fix to this
>> problem could be adding an option like"--files=*", that handles a
>> regular expression for filtering files.
>> Do you think of it to be a good idea?
>     I do not think so: * is intended to be expanded by the shell.
>   In that case, you would need the * to be expanded by the
>   program (probably through libc).

And, in bash at least, it would need to be --files="*" :-)

More information about the ubuntu-users mailing list