I have thousands of .fa
files in a directory. Names are:
ch14.fa_20452_206652_15-84.fa
ch14.fa_20452_206652_786-14.fa
ch14.fa_20452_206652_77-85.fa
ch14.fa_20452_206652_81-78.fa
ch2.fa_16903_17204-41-44.fa
ch2.fa_16903_17204-2-46.fa
ch2.fa_16903_17204-61-47.fa
ch2.fa_16903_17204-73-52.fa
I want to merge files with the similar beginning (ch14.ta_20452_206652
or ch2.ta_16903_17204
) into one fasta.
Tried to do it manually with:
cat *ch14.fa_20452_206652* > ch14.fa_20452_206652.fa
But it's impossible and driving me crazy. Hope that someone could help me