How to create folders/subfolders using shellscript

Hi,
Can any one help me how to create folders using shellscript.My requirement is:

FolderName: Main/Main1
:Main/Main2
:Main/Main3

underSubFolder : Main1/A
:Main1/B
:Main1/C

underSubfolder: A/A1
:A/A2
:A/A3

underSubfolder: B/B1
:B/B2
B/B3

--->MAIN
---> Main1
-->Main1A
-->A1
-->A2
--->A3
-->B
-->B1
-->B2
-->B3
-->C
--> C1
-->C2
-->C3
--->Main2
-->D1
--->D2
-->Main2

All these folders should have a permission equivalent to 755.

Thanks Lot.
Ram

hi

create a varaiable with all these folder names as per there order.
then start a for loop of these main folder values and create foldes using
mkdir and varaiable name.

nearly same code i m posting which delete all files in your folder and create a new one. you can use the same for your reference.

echo " in loop"

for f in *.a -- start loop of varaible- having folder values
do

    rm $f  ---- HERE USE mkdir
    echo $f
    cat /dev/null>  $f

    echo $f

done

use mkdir -p