title: How to loop over directories in Linux?
body: <p>I am writing a script in bash on Linux and need to go through all subdirectory names in a given directory. How can I loop through these directories (and skip regular files)?</p>
  
  <p><strong>For example:</strong><br>
  the given directory is <code>/tmp/</code><br>
  it has the following subdirectories: <code>/tmp/A, /tmp/B, /tmp/C</code></p>
  
  <p>I want to retrieve A, B, C.</p>