sh バージョン: 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
正常に動作していません。出力は
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