x=1 c1=string1 c2=string2 c3=string3 echo $c1 string1
I\'d like to have the output be string1 by using something like: echo $(c
string1
echo $(c
if you have bash 4.0, you can use associative arrays.. Or you can just use arrays. Another tool you can use is awk
eg
awk 'BEGIN{ c[1]="string1" c[2]="string2" c[3]="string3" for(x=1;x<=3;x++){ print c[x] } }'