In a directory, I had 9792 files from 1088 groups (1088 x 9 = 9792) each group has unique ID. I'm interested in concatenating only those files which matches group ID as a prefix.
OG000190,OG0012877,OG0012858 .... (1088) with a prefix = OG00.
Able to do it for each group individually using cat. How do I automate the process using loops. I tried unable to reproduce, some help.
cat *OG0012884. > OG0012884_out.fa OG0012884._1_1.txt.fa OG0012884._1_2.txt.fa OG0012884._1_3.txt.fa OG0012884._1_4.txt.fa OG0012884._1_5.txt.fa OG0012884._1_6.txt.fa OG0012884._1_7.txt.fa OG0012884._1_8.txt.fa OG0012884._1_9.txt.fa