8 points · by mardiyah · 5y ago · 5 comments
The source for this script is very strange; it looks like the output of a minifier/obfuscator, or otherwise machine generated. The entire script uses single character variable names, and most expressions have all optional whitespace removed.
Regardless of the "minified" style, the source is also missing double quotes on approximately 80% of variable expansions. The special variable expansion $@ and its array equivalent ${arr[@]} are regularly used unquoted, which does NOT preserve word splitting boundaries across whitespace like the $* ; this will cause bugs!
find . -name '*meta*'
If you want to use the matching files on a command line (requires "shopt -s globstar") some_command **/*meta*
The double star expands to any number of directories. You can even mix-and-match complex patterns as needed: some_command */data/**/*meta*
# matches:
# dir_a/data/meta
# dir_b/data/foo/bar/baz/meta.txt