Re: globstar syntax

2009-01-22 Thread Chet Ramey
Stephane CHAZELAS wrote: > In ksh93, ** matches any file in any directory and subdirectory, > while you need **/* in bash or zsh (**/* will also work in ksh). No, you don't. When `globstar' is enabled, ** will match every file in every directory and subdirectory in bash-4.0. Chet -- ``The lyf

Re: globstar syntax

2009-01-22 Thread Stephane CHAZELAS
2009-01-21, 22:49(-05), Chet Ramey: > Stephane CHAZELAS wrote: > >> Apparently, just like ksh93, bash4 only implements ** and not *** >> nor the globbing qualifiers, but like zsh it requires **/*.c >> (**.c won't work). > > I'm not sure what version of ksh93 you're using, but the latest version > I

Re: globstar syntax

2009-01-22 Thread Alex Reed
Thanks Chet, and everyone who has contributed.

Re: globstar syntax

2009-01-21 Thread Chet Ramey
Stephane CHAZELAS wrote: > Apparently, just like ksh93, bash4 only implements ** and not *** > nor the globbing qualifiers, but like zsh it requires **/*.c > (**.c won't work). I'm not sure what version of ksh93 you're using, but the latest version I have (t+ 2008-11-11) requires **/*.c as well.

Re: globstar syntax

2009-01-21 Thread Stephane CHAZELAS
2009-01-21, 02:48(+01), Sebastian Kapfer: > 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 imple

Re: globstar syntax

2009-01-20 Thread Chet Ramey
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: >

Re: globstar syntax

2009-01-20 Thread Chet Ramey
> > 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)? > > No. > > The globstar syntax only allows recursive directory traversal. However, let me add that you can achieve what you want

Re: globstar syntax

2009-01-20 Thread Sebastian Kapfer
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} =~

Re: globstar syntax

2009-01-20 Thread Chet Ramey
> 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)? No. The globstar syntax only allows recursive directory traversal. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer