Write a Linux Bash script, create.sh which creates a directory tree with depth d and breadth b in a programmable depth/breadth-first fashion, where depth-first or breadth-first can be crontrolled by a command line parameter. Depth refers to the level of the directory tree while breadth refers to the number of directories a directory may have. Use d and b between 3 and 5 inclusive for testing purposes. Your script must be able to handle any depth and breadth. Your command "create.sh 3 4 /home/cs288/hw2/tree depth" will create a tree with depth 3 and breath 4 at /home/cs288/hw2/tree-depth in depth-first while your command "create.sh 4 3 /home/cs288/hw2/tree breadth" will create a tree with depth 4 and breath 3 at /home/cs288/hw2/tree-breadth in breadth-first.
Caution: Do not actually create a dir tree to begin with. First, simulate the tree structure until you can successfully create one. No need to put strain on your already hard-working hard disk for repeated reading/writing.
A correct way for depth-first with d=4, b=3 is