본문 바로가기

IT

sh, bash에서 array 사용

#!/bin/bash
int_array=(1 2 3)

for i in ${index_array[@]}
do
  echo $i
done