[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash 5: globstar (sometimes) no longer prints symlinks to directorie
Re: bash 5: globstar (sometimes) no longer prints symlinks to directories
Mon, 8 Apr 2019 15:57:28 -0400
On Mon, Apr 08, 2019 at 12:57:52PM -0400, Eli Schwartz wrote:
> #bash pointed out to me that **/* will do what I want on both bash 4 and
> bash 5, but I'm afraid I totally don't understand what the rules of
> globstar are supposed to be, or whether changes to the output are
> intended. The behavior also doesn't really seem to correspond to the
The language in the man page seems to be copied directly from ksh.
Under "File Name Generation", ksh(1) says:
∗ Matches any string, including the null string. When used
for filename expansion, if the globstar option is on, two
adjacent ∗'s by itself will match all files and zero or
more directories and subdirectories. If followed by a /
then only directories and subdirectories will match.
And bash(1) says:
If set, the pattern ** used in a pathname expansion con‐
text will match all files and zero or more directories
and subdirectories. If the pattern is followed by a /,
only directories and subdirectories match.
I don't really understand what "all files and zero or more directories
and subdirectories" means either. Whatever the end result is, I hope the
man page can be made a bit more clear.