I'm looking for a solution in bash to rename multiple fastq files in a bioinformatics pipeline in a for loop, or something similar. The information is contained in two lists.
List A
SRR11111111
SRR11111112
SRR11111113
SRR11111114
SRR11111115
List B
Sample1
Sample2
Sample3
Sample4
Sample5
I need to change the names of the fastq files from those contained in list A to the names in list B. So the fastq file named SRR11111111
(position 1 in list A) becomes sample1
(position 1 in list B) and so on. Although, the loop below is nonsense, it gives you an idea of what I want to do.
for file in listA
do
mv listA[position] listB[position]
done
In other packages such as python I would use a dictionary for this, using key-value pairs, or use a config file but not sure of the most efficient method to do this in bash.
This question is similar but not exactly what I'm looking for.