#!/bin/bash array=(aaaa bbbb cccc dddd) a_len=${#array[@]} for((i=0;i<a_len;i++)) do echo ${array[$i]} done