[bash] how to use bash-shell array

how to use bash-shell array

#!/bin/bash
#
echo "### title: b36_run_b35.sh"
array=(0 1 2 3 4)
for((i=0;i<${#array[@]};i++))
do
    echo ${array[i]}
done

array :

array=(element_1 element_2 element_3 element_4)

length of array:

${#array[@]}

ith of array:

${array[i]}

你可能感兴趣的:(bash)