ARRAY=(1 2 3) ARRAY+=(4)
${ARRAY}
${ARRAY[0]}
${#ARRAY[@]}
ARRAY=(1 2 3) ARRAY+=(4) for ((i=0; i<${#ARRAY[@]}; i++)) do echo ${ARRAY[$i]} done
<function-name>() { echo $1 }
<function-name> <function-name> a b c ※引数あり
if [ 条件式 ]; then <command> elif [ 条件式 ]; then <command> else <command> fi if test 条件式; then <command> fi
case <変数> in <value1> ) <command> ;; <value2> ) <command> ;; * ) <command> ;; esac
while [ <条件式> ] do <comand> done
CSVFILE="./sample.csv" while IFS=, read col_a col_b col_c; do a_arr+=($col_a) b_arr+=($col_b) c_arr+=($col_c) done < $CSVFILE ※環境変数IFSは内部フィールド区切り文字(Internal Field Separator)
until [ <条件式> ] do <command> done
for str in 1 2 3 for str in `seq 0 10` for str in {0..10} do <command> done