Nest wildcards when matching file names
I’ve found fairly accidentally that wildcards can be nested. For example, consider the following structure:
.
├── version-2.9
│ ├── bar
│ ├── baz
│ └── foo
├── version-3.4
│ ├── bar
│ ├── baz
│ └── foo
└── version-3.8
├── bar
├── baz
└── foo
If you want to match ba*
in version-3.*
, you’d just do:
ls version-3.*/ba*
version-3.4/bar version-3.4/baz version-3.8/bar version-3.8/baz
The shell matching logic is smart enough to “nest” the two wildcards.
What a time to be alive! :)