If I have an array:
declare -a arr=("element1" "element2" "element3" "element4" "element5" "element6")
for i in "${arr[@]}"
do
echo "$i"
done
and only wanted to loop through the element3
to element 6
, how can I specify that? Generally, if I wanted to exclude the first k
elements of an array, is there a way to subset that array?