Sebastian Kapfer wrote: > Am Montag, den 19.01.2009, 10:14 -0800 schrieb Alex Reed: >> Should the globstar (**) syntax allow for partial parameter matching >> (i.e. **.c to find all *.c files in the current directory and its sub- >> directories)? >> >> Currently this can be implemented like this: >> for i in **; do if [[ ${i} =~ \.c$ ]]; then <my_operation>; fi; done > > Huh? > > So what's the difference between the following two lines > > echo ** > > echo `find`
Nothing. But now try to duplicate the effect of **/*.c, which does what Alex wants. The difference between his desired syntax and what's implemented is that the `**' has to appear on its own as a directory element to have its special meaning. Sorry if my rather terse reply to his question didn't make that clear. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/