0

Doing:

print -l ./somedir/**/*.{png,jpg} gives expected listing of png and jpg files, and there are both types of them present, BUT

print -l ./somedir/**/*.{png,jpg}(Lk+50) does NOT list my jpg files greater than 50k, saying no matches found ./somedir/**/*.png(Lk+50).

Why it stops on png here, not expanding on jpg as well?

branquito
  • 3,864
  • 5
  • 35
  • 60

1 Answers1

0

According to documentation, saying:

Note that brace expansion is not part of filename generation (globbing); an expression such as */{foo,bar} is split into two separate words */foo and */bar before filename generation takes place. In particular, note that this is liable to produce a ‘no match’ error if either of the two expressions does not match; this is to be contrasted with */(foo|bar), which is treated as a single pattern but otherwise has similar effects.

I got to the conclusion that instead I have to write:

print -l ./somedir/**/*.(png|jpg)(Lk+50) ,to obtain the desired result.

branquito
  • 3,864
  • 5
  • 35
  • 60