Look at the following:
$ echo .[].aliases[] .. $ echo .[].foo[] .. $ echo .[].[] .. $ echo .[].xyz[] .. $ echo .xyz[].xyz[] .xyz[].xyz[] $ echo .xyz[].[] .xyz[].[] So apparentlyApparently this seems to be globbing something, but I don’t understand how the result comes together. From my understanding [] is an empty character class. It would be intuitive if it matched only the empty string (in this case, I’d expect bash to reproduce in its entirety since nothing matches it in this directory, but also match things like ..aliases (in the first example)), or nothing at all (in this case case, I’d expect bash to reproduce the string in total, too).
- it matched only the empty string; in this case, I’d expect bash to reproduce in its entirety since nothing matches it in this directory, but also match things like
..aliases(in the first example), - or nothing at all; in this case, I’d expect bash to reproduce the string in total, too.
This is with GNU bash, version 4.4.23(1)-release.