I want to create a directory in such a way that I need to label the directories from a to z. Inside each of these directories, I need to create sub-directories so that they are labelled as aa, ab etc. So, for instance, for the directory m, my sub-directories will be labelled as ma, mb upto mz. 
Recursively create directories for all letters
shell script;mkdir
Try:for x in {a..z} ; do mkdir -p $x/${x}{a..z} ; doneBash will expand XXX{a..z} out to XXXa, XXXb, and so on. There's no need for the inner loop you have.After that:$ lsa  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z$ ls mma  mc  me  mg  mi  mk  mm  mo  mq  ms  mu  mw  mymb  md  mf  mh  mj  ml  mn  mp  mr  mt  mv  mx  mz