Reputation: 1151
For example, the following directory structure:
$ tree
.
├── app.js
├── lib
│ └── util.js
└── test
└── main.js
2 directories, 3 files
I would like to match js files from the current directory and lib/
directory, sort of like:
$ ls *.js lib/*.js
app.js lib/util.js
but in a single glob. And this does not do it:
ls @(.|lib)/*.js
any ideas?
Upvotes: 0
Views: 124
Reputation: 123608
I doubt if a glob would do the intended. You could use brace expansion, however:
echo {.,lib}/*.js
Upvotes: 1