I am not sure I follow the logic??
1. read -a Files -> this means read into the array Files - as find will return each item found, why would you want to read them into an array?
2. you refer to ${Files} throughout the loop -> again see above but this is not how you would refer to an array, should be something like ${Files[@]}
3. cat "${Files}" | sort >> temp.list - you mentioned that the files contain one link each (I look at this as saying only one line in each file) ... if this is the case there is nothing to sort??
So this should just be:
Code:
cat "${Files}" >> temp.list
4. I am not familiar with the 'mimetype' command, but are you 100% that the output is exactly what you have listed? Remembering that any whitespace or different case would make the tests fail
5. personally I would use a for loop with globbing and pass if the files are not the ones your looking for (again though ... that is just my thought on that one)
Hope some of that helps