I need to use the name of a variable that I create using the character included into an array.
The arrayRN contains "a,b,c,d,e,f,g,h,i,l,m,n,o,p"
and with a for loop I would use each time a different value for DN and RN variable like DNa, RNa, DNb, RNb, DNc, RNc and so on
for (i in arrayRN) {
DN<here I have to put value of the array that could be from a to q> =substr($3,1,length($3)-1)
if (NF==12) {
RN<here I have to put value of the array that could be from a to q> = $12
}
else {
RN<here I have to put value of the array that could be from a to q> = ""
}
getline
if ($0 ~/Origine =/) {
break
}
}
I tried with:
RN{arrayRN}
RN[arrayRN]
RN(arrayRN)
Is there any way to do it?
Thanks
Massimo
The arrayRN contains "a,b,c,d,e,f,g,h,i,l,m,n,o,p"
and with a for loop I would use each time a different value for DN and RN variable like DNa, RNa, DNb, RNb, DNc, RNc and so on
for (i in arrayRN) {
DN<here I have to put value of the array that could be from a to q> =substr($3,1,length($3)-1)
if (NF==12) {
RN<here I have to put value of the array that could be from a to q> = $12
}
else {
RN<here I have to put value of the array that could be from a to q> = ""
}
getline
if ($0 ~/Origine =/) {
break
}
}
I tried with:
RN{arrayRN}
RN[arrayRN]
RN(arrayRN)
Is there any way to do it?
Thanks
Massimo