title: bash - For each directory in a folder, make a directory within a different location
body: <p>I have a directory which contains several folders.
  I'd like to make a bash script to create directories with the same name in a different location.</p>
  
  <p>Note that I don't want to copy the folder structure, neither copy or move the folders. I just want to create folders with the same name in a different location.</p>
  
  <p>I'm stuck. Using this:</p>
  
  <pre><code>for d in "template/modules/*"
  do
      # mkdir $(basename "$d");
      echo $d;
      echo "$d";
      echo $(basename "$d");
  done
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>template/modules/introduction template/modules/kitchen template/modules/test
  template/modules/*
  add_module.sh template
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Cheers</p>