I think this is a rather simple question but, I cant make this work: I have a whole lists of variables eg:
SP60=OLA SP61=BYE SP62=TRT
I want to create a loop to call them in the specific number of the variable so I thought a short solution could be:
for i in {60..62}; do SP=$"SP$i"; echo $SP.txt; done
I was expecting the outcome to be:
OLA.txt BYE.txt TRT.txt
but I get
SP60.txt...
I would like to know if there is a simple way to get this done.