emanuele6 1667507595 learn # exec {afd}< <(seq 1 10); declare -A assign=(); lines=() do_assign='assign[0${lines[${#lines[@]}]=$(read -ru "$afd";printf %s\\n "$REPLY")}]'; declare -n a='lines[do_assign,${#lines[@]}]'; echo "$a" "$a"; echo "$a"; echo "$a" "$a" "$a" emanuele6 1721160140 forget emanuele6 1721160165 learn # exec {afd}< <(seq 1 10); declare -A assign=(); lines=(); declare -n a='lines[assign[0${lines[${#lines[@]}]=$(read -ru "$afd";printf %s\\n "$REPLY")}],${#lines[@]} - 1]'; echo "$a" "$a"; echo "$a"; echo "$a" "$a" "$a"