Hi all,How do I select elements with indices that are multiples of 3, in an array? For example, I have,list=( 123 native Terminal 456 native Excel 789 native X11 ) and would like to select, Terminal Excel X11
for i in {1..3}; do
print $list[$(($i*3))]
done
or build a new array:
new=()
for i in {1..3}; do
new+=( $list[$(($i*3))] )
done
-Eric
for compadd. Help is much appreciated. Wataru Kagawa