Help concatenation string and variable

Hello,
in my script i have this lines of code in a while cycle:

..
let j=i+1
t_prod_$i = `cat myfile.csv | grep world | cut -d ";" -f$j`
let i+=1
...

So if i try an echo $t_prod_$i at the end of the cycle i cannot see
the right value obtained by `cat myfile.csv | grep world | cut -d ";" -f
$j` but I receive an error:

./myscript.sh[17]: t_prod_1: not found.

how i should assign output of the command between ` ` to the variable
t_prod_$i (so i will have t_prod_1= ... t_prod_2=... )??

thanks for helping

try

eval t_prod_$i = `cat myfile.csv | grep world | cut -d ";" -f$j`

nothing get the same error...

i'm using Posix Shell under Hp-UX

hi,

can u try removing the space bewteen t_prod_$i and =

eval t_prod_$i= `cat myfile.csv | grep world | cut -d ";" -f$j`

:frowning: nothing

if I put standard variable name, like t_prod_1= ... i have no problem, maybe i cannot create dinamically variable names? :confused:

need a way to build variable in this manner:

variable_$i

where i goes from 1 to 5 for example...

and then print them on screen with echo $variable_$i

which is the best way to do this?