title: how do i loop through folders alphabetically up to certain folders
body: <p>I am new to shell so please pardon me with my pseudocode below. Is there any in-built method in shell that could help me iterate up to certain folders i..e <code>[A-M0-9]</code></p>
  
  <p>first i want to cd into the parent directory that consists of folders name starting from <code>A-Z</code>then once i am in the parent folder i want to sort the parent directory alphabetically and then iterate through sub-directories from [A-M0-9].</p>
  
  <p>Below would the pseudocode of something what i am trying to attempt -</p>
  
  <pre><code>cd /temp/parentDir
  
  for f in [A-M0-9]
  do
  echo $f
  done
  </code></pre>