sh version : 1.14.7
#!/bin/sh
cpu_to_eth1=10
cpu_to_eth2=20
cpu_to_eth3=30
cpu_to_eth4=40
i=0
for i in 1 2 3 4
do
echo "value of the $i th varible is $cpu_to_eth$i"
done
it is not working properly,the output should be
value of the 1 th varible is 10
value of the 2 th varible is 20
value of the 3 th varible is 30
value of the 4 th varible is 40
$cpu_to_eth, followed by$i. just as you would expect.bash?