[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
L A Walsh
Fri, 28 Apr 2017 17:09:11 -0700
I wanted to search for a file that had 'Tokyo' in the basename,
in all directories below a given point. I had been doing it 'find',
but thought globstar should work.
W/globstar set, I looked for:
(found multiple matches (including the one I was
A sample file I was searching for:
I.e. had Tokyo in _both_, dir and subfiles,
Why didn't any of the 1st 3 patterns find anything?
It seemed that I needed a '/' in the pattern for it
to be processed as a globstar pattern...??
Is that supposed to be a requirement for globstar
to function? From this (from bash manpage):
* Matches any string, including the null string. When the
globstar shell option is enabled, and * is used in a
pathname expansion context, two adjacent *s used as a
single pattern will match all files and zero or more
directories and subdirectories. If followed by a /, two
adjacent *s will match only directories and subdirecto-
The slashes don't seem to be required.
Other glob settings:
- globstar question,
L A Walsh <=