Linux Posts, Programming Posts, Atmega Posts and others.
Search This Blog
Friday, February 13, 2009
Array in linux scripts
#array=(a b c d e f) array=(`ls`) #total elements len=${#array[*]} echo "The array has $len elements." #array starts from 0 i=0 echo -e "Array is :-" while [ $i -lt $len ]; do echo "$i: ${array[$i]}" let i++ done
No comments:
Post a Comment