Apart from the commands that can be used in connection with shell shells, I would like to exclude certain directory templates in all directories and subdirectories from the glob template.
Say I have this directory structure:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
I would like to list all js files that do not have assetsfiles in their paths.
What I have tried so far:
$ shopt -s globstar extglob
$ ls ./**/!(assets)/**/*.js
Not only did the above template fail, it even shows repetitive exits. I know I can do something like this:
$ ls .*.js | grep -v "assets"
Or any other commands that can be transmitted over channels, I just want to get a clean shell wrapper template.
Expected Result:
a/a2/a2.js
b/b.js
c/c.js
source
share