Create child directories from parent directory
A simple Bourne shell script will do it:
#!/bin/sh
for dir_name in */ ; do
echo "$dir_name"
mkdir "$dir_name/$dir_name"
done
Loop through only the directories (*/
), and for each directory, make a child with the same name as the parent (mkdir "$dir_name/$dir_name"
).
This only works for one level - it is not recursive - which is probably what you want anyway.
For more examples, see How do I loop through only directories in bash?