[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some globstar patterns produce duplicate entries and a null filename
From: |
Ulf Magnusson |
Subject: |
Some globstar patterns produce duplicate entries and a null filename |
Date: |
Sat, 1 Dec 2012 16:41:45 +0100 |
GNU bash, version 4.2.24(1)-release (i686-pc-linux-gnu)
Take the following example, assumed to be run in an empty directory:
$ mkdir a
$ echo **
a
$ echo **/**
a a
$ echo **/**/**
a a a
I would expect the result to be just 'a' in all cases.
You also get back a null filename, as shown by
$ for f in **/**/**; do echo "'$f'"; done
''
'a'
'a'
'a'
/Ulf
- Some globstar patterns produce duplicate entries and a null filename,
Ulf Magnusson <=
Re: Some globstar patterns produce duplicate entries and a null filename, Chet Ramey, 2012/12/04