I want to select all the sub-directories in a given folder that have a certain number (in this case, 75) files within them. Then I want to take the name of each of these sub-directories and assign it a new variable name to use throughout the rest of my script.
Here an idea.
filecount is the number of files you want to find. For each folder with this number of files, a variable will be created. The variable-name is the folder-name but the "/" were substituted by "_"
filecount=1 for i in `find folder -type d` do