I have 10 folders which contain files of the formated like so
"xaaNP_len_0.fa"
or
"xaaP_len_0.fa"
the "xaa" part is unique to the folder it is in. the folders are named
[xaa, xab....xaj]
I want to concatenate all the files that match a specific pattern together.
For example I would like to concatenate all the
P_len_*.fa
where * is an integer from 0 to 100. This should not include the case where the "P" has an "N" to the left.
Next I want to concatenate all the
NP_len_*.fa
files together in the same manner across all 10 directories.e
The structure of the files is flat. For example
xaa/xaaNP_len_0.fa
xab/xabNP_len_0.fa
should all got into one file named
NP_len_0.fa