title: loop over files in a directory conditional on date in directory name (Mac os - zsh)
body: <p>I have a directory structure Year-month-date name:</p>
  <pre><code>2021-05-02 Linus
  2021-04-02 Jay
  2021-07-03 Sara
  </code></pre>
  <p>etc...</p>
  <p>Now I´d like to loop over all directories with month &lt;6 and run a script. Without the condition I do the following, but cannot figure out how to condition..</p>
  <pre><code>for f in ./*;  do  (cd &quot;$f&quot;;  printf &quot;file '%s'\n&quot; *.csv&gt;mylist.txt ); done;
  </code></pre>
  <p>Mac OS Big Sur with zsh</p>