I'm trying to write a script to do the following: There´s a directory "x". In this directory there are several folders, some of these folders begin with NZ or NC (e.g NZ_FGT10000, NC_HGU987000) (folders containing fasta files). Inside these folders, there are files that begin with the word "cluster" (these are the fasta files) and other files. Inside the directory "x" i have a folder called "y". I want to access every folder in the directory "x" that begins with NZ or NC in their names, and copy all the files that begins with "cluster" to the folder "y".
Im new to the world of linux and shell, and i have no experience in bash, so i would appreciate the help. Thank you.