You shared a Wikipedia link with sources[1] (and also numerous sections and assertions in the Wikipedia article itself) showing that cats generally impact wildlife populations but came to the conclusion that they don't. Am I missing something here? Is it because you're specifically focusing on birds?
[1] https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/1365-2656.13745
5 CONCLUSIONS
Free-roaming domestic cats affect wildlife through predation, disease, hybridization, and indirect fear and competition effects. Our review highlights biases and gaps in the global literature on these impacts, including a focus on oceanic islands, Australia, Europe and North America, and on rural areas, predation, impacts of unowned cats, and impacts at population and species levels. Key research advances needed to better understand cat impacts include more studies in underrepresented regions (Africa, Asia, South America), on impacts other than predation, and on management methods designed to reduce impacts. This review also supports past studies in illustrating that cats negatively affect wildlife populations and communities in most cases in which these potential impacts were evaluated
For loops with find are evil for a lot of reasons, one of which is spaces:
You can kinda fix that with IFS (this breaks if newlines are in the filename which would probably only happen in a malicious context):
But you can also use something like:
or in your case this could all be done from
find
alone:-execdir
in this case is basically replacing yourcd $(dirname $y)
, which is also brittle when it comes to spaces and should be quoted:cd "$(dirname "$y")"
.