[Shell-Script] Loops for each element of a tabular

Because, I have some difficulties to record this information in my mind :)
In this code we create a tabular and then do a loops on each element to print the result:

tab[0]="Don"
tab[1]="Unix"
tab[2]="Unix Tips n Tricks"

for var in ${tab[@]}; do
echo $var
done

No comments: