$ a=(a b c) $ echo $a a b c $ echo $a[1] a $ echo $a[2] b
$ for x in $a; do echo $x; done a b c
$ a=() $ a+=1 $ echo $a 1 $ a+=2 $ echo $a 1 2
$ echo ${#a[@]} 3