Socialabel

Sunday, February 1, 2009

[x] Array Bash Loop Split String

Private Content
baris berikut untuk arsip pribadi, --
#!/bin/bash
nama=( Ahmad Heryanto )
for nama in ${nama[@]}
do
          echo $nama
done
echo “INI ARRAY”
for (( i = 0 ; i < ${#nama[@]} ; i++ ))
do
         echo ${nama[$i]}
done