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 ; fi; done
It would be pleasantly convenient if this w
> 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
Jan Schampera wrote:
> Hello list!
>
> Just a few thoughts, awaiting comments.
Heh. I wanted to raise a discussion about that issue, but it seems I
failed (or I'm the only one who cares) ;)
Jan
Linda Walsh wrote:
> Am running an older bash version and this may be fixed (assuming it
> is a bug and I'm not confused...:-))
>
> bash version = 3.2.39(20)
>
> This works:
> 1)if [ -n "" -a 2 -gt 1 ] ; then echo one;fi
>
> This does not:
> 2)if [[ -n "" -a 2 -gt 1 ]] ; then echo on
Dan Nicolaescu wrote:
> Chet Ramey writes:
> > Dan Nicolaescu wrote:
> > > Unfortunately the behavior is not consistent with what dabbrev-expand
> > > does in Emacs (and tcsh), so it will be quite confusing for users to
> > > use.
> > ...
> > It might not be exactly the way emacs and tc
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} =~
> > 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
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:
>