title: Bash shell iterating through directory doesn't work as expected
body: <p>I am trying to iterate through a directory but the for loop doesn't work as expected. Look at this:</p>
  <pre><code>for dirname in &quot;/dir_example/*&quot;; do
      echo &quot;$dirname&quot;
  done
  </code></pre>
  <p>What happens is that it only echos the string &quot;/dir_example/*&quot; and do not iterate over the directories. I tried it on another server and it worked. The shell is bash on the same computers. How is it possible?</p>