I am trying to figure out an elegant way to create a new subdirectory in a series of existing directories.
I have 15 already created directories called Week1 through Week15. Within those directories, I'd like to create a new directory called "Assignments." I'm thinking this might require a loop of some kind, but outside of that I'm a little lost.
I know I can "cd" into each directory and then "mkdir Assignment" and repeat this step for all 15 directories, but I know there must be an easier way.
Any help/advice will be greatly appreciated!
You can do it without a loop:
There are a few ways - try using this loop:
You could also cheat at the
Week
folders - use this:Just for future reference - if you need to do something similar.