Try it like this, it's complicated but works. Maybe there is an easier solution.
This will create file1-0
, file1-1
, file2-0
, file2-1
In my case and from your example, file1-0 had data you needed from file1 and file2-1 had data you needed from file2, check output of those files bellow
[mtodoric@bulletproof test]$ cat file1-0
GCCAAACAGCTAGCTTGA
GCCAAACAGCTAGCTTGATTAATAA
GCCAAACAGCTAGCTTGATTAATAATATAA
GCCAACCAGCTAGCTTAA
GCTAACCAGCTAGCTTAA
GCTGACTAGCTAGCCAACATATTT
GCCCAACAGCTAGCCCACTCA
GCCAACCAGCTAGCTTAAT
GCCAACCAGCTAGCTTAATT
[mtodoric@bulletproof test]$ cat file2-1
Siphateles.boraxobius_complete-mitochondrion_harney-county-or.fasta
Siphateles.boraxobius_complete-mitochondrion_harney-county-or.fasta
Siphateles.alvordensis_complete-mitochondrion_harney-county-or.fasta
Rhinichthys.evermanni_complete-mitochondrion_douglas-county-or.fasta
Oregonichthys.kalawatseti_complete-mitochondrion_linn-county-or.fasta
Oncorhynchus.mykiss.irideus_complete-mitochondrion_douglas-county-or.fasta
Cottus.perplexus_complete-mitochondrion_douglas-county-or.fasta
Oncorhynchus.mykiss.irideus_complete-mitochondrion_douglas-county-or.fasta
Cottus.perplexus_complete-mitochondrion_douglas-county-or.fasta
This will basically read from file2-1 (since that file had the first line from your example output), echo each line into another file (final.txt), but also, thanks to variable RB will get that line number from another file and print stdout to final.txt, and will increase the value of RB so it can increment the line on next loop.
Replace names of file2-1 and file1-0 in "one liner" to correspond your data.
Hope this helps it.