How to assign eval value as Variable..

Im facing problem in assigning value of eval array variable as normal variable..

x=0
eval DATA${x}="FJSVcpcu"
x=`expr $x + 1`
eval DATA${x}="FJSVcsr"

if x=0, type -> eval echo \$DATA$x , its give me FJSVcpcu
i want assign this value into an variable as

variable=`eval echo \$DATA$x`

but when i echo variable , the value show me 0, instead of FJSVcpcu

how i can fix this problem so i can get "FJSVcpcu" as variable value??

Hi,

what you are looking for is an array. Try:

DATA=( help me out of here)
echo ${DATA[1]}

Willl give you the first value.

Don't do

x=`expr $x + 1`

use

let x++

HTH Chris

im using bourne shell bro...

Then you have to use:

x=1
eval "DATA`eval "echo $x"`=csr"
x=2
eval "DATA`eval "echo $x"`=csr"