最佳答案
像这样读:
read -a arr
测试:
read -a arr <<< "1 4 6 9 11 17 22"
print数组中的元素数:
echo ${#arr[@]}
OR循环上面的数组
for i in ${arr[@]}
do
echo $i # or do whatever with individual element of the array
done