AImager

数组

arr=(A B C D 1 2 3 4)
for i in "${!arr[@]}";
do
    printf "%s\t%s\n" "$i" "${arr[$i]}"
done

数组长度

${#array[@]}

参考链接