grep is always recursive

Hal Burgiss hal at
Sun Jan 25 16:21:07 UTC 2009

On Sun, Jan 25, 2009 at 09:08:27AM -0700, Smoot Carl-Mitchell wrote:
> The GNU option processor does not care where an option appears in the
> command line which is a little odd and not what the documentation
> suggests is the correct syntax. e.g. options come first before file
> names, etc.  Anything with a leading "-" is considered an option.  Try
> this sometime:
> ls <file> -l <another_file>

It certainly seems counter-intuitive to me, if not potentially
dangerous. Imagine the accidental chaining of options with 'rm'.

In any case, there is one less mystery in the world!


More information about the ubuntu-users mailing list