> Mhhh... I never used "globstar" and ksh93 on SuSE Linux 10.0 seem to
> have it "off":
> -- snip --
> $ set -o | fgrep glob
> globstar                 off
> noglob                   off
> -- snip --
> April/Mike - any opinions ?
> 
> ----
> 

globstar allows ** to match zero or more directories so that
        **/*.c
will match all files under . that end in .c.  However, when used
with non-builtins it may generate lists that are too large
for the ARG_MAX limit.

However, users can use
        command -x cmd ** ...
which will run cmd as many times as necessary to process all the argument.
Thus
        alias grep='command -x grep'

        grep foo **/*.c

will find all lines matching foo in all .c files under the current directory
without any limit as to the number of files.

In any event if it were not for POSIX, I would have made this the
default and I don't think that anything would break.

David Korn
dgk at research.att.com

Reply via email to