mkdir -p maindir/{assets/{css,js,img},src/{sass,types,img},dirX,dirY}

Produces:

The -p flag tells the mkdir command to create the main directory first if it doesn’t already exist (htg, in our case). The words in the brackets are part of the “brace expansion list”. Each of the items in the brace expansion list is appended separately to the preceding path ( maindir/).

If you want to remove all empty dirs including maindir you would run

# cd maindir
find . -type d -empty -delete -mindepth 1
cd ..
rmdir maindir 

0
Would love your thoughts, please comment.x
()
x