I can add one more example, which change array size while it's not expected behavior:
x=("/"); y=("${x[@]%/}"); echo "x size: ${#x[@]}, y size: ${#y[@]}"

Goal of this example show that it is not only for loop issue.

Reply via email to